diff --git a/aumms/aumms/doc_events/item.py b/aumms/aumms/doc_events/item.py
index c82bcadb..4482c3fb 100644
--- a/aumms/aumms/doc_events/item.py
+++ b/aumms/aumms/doc_events/item.py
@@ -1,15 +1,14 @@
-import os
import io
import json
-import frappe
-from frappe import _
+import os
from datetime import date
-from pyqrcode import create
-from base64 import b64encode
-from pyqrcode import create as qr_create
-from frappe.utils.data import get_url_to_form
+
+import frappe
from aumms.aumms.utils import get_conversion_factor
+from frappe import _
from frappe.custom.doctype.custom_field.custom_field import create_custom_fields
+from pyqrcode import create
+
@frappe.whitelist()
def validate_item(doc, method):
@@ -41,8 +40,12 @@ def uom_is_a_purity_uom(uom):
uom: name of uom document
output: a message iff uom is not a purity uom
"""
- if not frappe.db.exists('UOM', {'name': uom, 'is_purity_uom': 1}):
- frappe.throw(_('{} is not a purity uom'.format(uom)))
+ pass
+ #
+ # This is kept in pass because the integration of Nos as stock qty is ongoing
+ #
+ # if not frappe.db.exists('UOM', {'name': uom, 'is_purity_uom': 1}):
+ # frappe.throw(_('{} is not a purity uom'.format(uom)))
@frappe.whitelist()
def get_purity_uom():
diff --git a/aumms/aumms/doc_events/stock_reconciliation.py b/aumms/aumms/doc_events/stock_reconciliation.py
new file mode 100644
index 00000000..bea9749b
--- /dev/null
+++ b/aumms/aumms/doc_events/stock_reconciliation.py
@@ -0,0 +1,80 @@
+import frappe
+from frappe import _
+
+
+def get_balance_qty(aumms_item_doc):
+ filters = {
+ "item_type": aumms_item_doc.item_type,
+ "purity": aumms_item_doc.purity,
+ "stock_uom": aumms_item_doc.weight_uom,
+ "is_cancelled": 0,
+ }
+ return frappe.db.get_value("Metal Ledger Entry", filters, "balance_qty") or 0
+
+
+def insert_metal_ledger_entry(
+ doc, item, aumms_item_doc, balance_qty, is_reversal=False
+):
+ fields = {
+ "doctype": "Metal Ledger Entry",
+ "posting_date": doc.posting_date,
+ "posting_time": doc.posting_time,
+ "voucher_type": doc.doctype,
+ "voucher_no": doc.name,
+ "company": frappe.defaults.get_defaults().company,
+ "item_code": item.item_code,
+ "item_name": item.item_name,
+ "stock_uom": aumms_item_doc.weight_uom,
+ "purity": aumms_item_doc.purity,
+ "purity_percentage": aumms_item_doc.purity_percentage,
+ "board_rate": item.valuation_rate,
+ "batch_no": item.batch_no,
+ "item_type": aumms_item_doc.item_type,
+ "balance_qty": balance_qty
+ + (
+ aumms_item_doc.gold_weight
+ if not is_reversal
+ else -aumms_item_doc.gold_weight
+ ),
+ "amount": item.amount if not is_reversal else -item.amount,
+ "incoming_rate" if not is_reversal else "outgoing_rate": item.valuation_rate,
+ "entry_type": "Opening Stock" if doc.purpose == 'Opening Stock' else None
+ }
+
+
+ frappe.get_doc(fields).insert(ignore_permissions=1)
+
+
+def process_metal_ledger(doc, is_reversal=False):
+ if not doc.keep_metal_ledger:
+ return
+
+ ledger_created = False
+ for item in doc.items:
+ aumms_item_doc = frappe.get_doc("AuMMS Item", item.item_code)
+ balance_qty = get_balance_qty(aumms_item_doc)
+
+ insert_metal_ledger_entry(doc, item, aumms_item_doc, balance_qty, is_reversal)
+ ledger_created = True
+
+ if ledger_created:
+ action = _("reversed") if is_reversal else _("created")
+ frappe.msgprint(
+ _("Metal Ledger Entry is {0}.").format(action),
+ indicator="green" if not is_reversal else "red",
+ alert=1,
+ )
+
+
+def create_mle_against_sr(doc, method=None):
+ """
+ Method to create metal ledger entries on submit.
+ """
+ process_metal_ledger(doc)
+
+
+def reverse_mle_against_sr(doc, method=None):
+ """
+ Method to reverse metal ledger entries on cancel.
+ """
+ process_metal_ledger(doc, is_reversal=True)
diff --git a/aumms/aumms/doctype/aumms_item/aumms_item.js b/aumms/aumms/doctype/aumms_item/aumms_item.js
index 3aa62083..277c4bf9 100644
--- a/aumms/aumms/doctype/aumms_item/aumms_item.js
+++ b/aumms/aumms/doctype/aumms_item/aumms_item.js
@@ -237,3 +237,61 @@ let calculate_stone_weight_and_charge = function(frm){
frm.set_value('stone_weight', stone_weight);
frm.set_value('stone_charge', stone_charge);
}
+
+
+// Button to create Stock reconciliation
+
+frappe.ui.form.on('AuMMS Item', {
+ refresh: function(frm) {
+ frm.page.set_primary_action(__('Create'), function() {
+ // Remove any existing "Create Opening Stock" button
+ frm.remove_custom_button('Create Opening Stock');
+
+ // Add "Create Opening Stock" button
+ frm.add_custom_button(__('Create Opening Stock'), function() {
+ // Open a dialog to select the Board Rate
+ let dialog = new frappe.ui.Dialog({
+ title: __('Select Board Rate'),
+ fields: [
+ {
+ label: __('Board Rate'),
+ fieldname: 'board_rate',
+ fieldtype: 'Link',
+ options: 'Board Rate',
+ reqd: true
+ }
+ ],
+ primary_action_label: __('Create Opening Stock'),
+ primary_action: function(data) {
+ dialog.hide(); // Hide dialog after selection
+
+ // Call the server-side function to create the opening stock
+ frappe.call({
+ method: 'aumms.aumms.doctype.aumms_item.aumms_item.create_opening_stock',
+ args: {
+ item_list: frm.doc.name,
+ board_rate: data.board_rate
+ },
+ freeze: true,
+ freeze_message: __('Creating Opening Stock...'),
+ callback: function(r) {
+ if (!r.exc) {
+ frappe.msgprint({
+ title: __('Success'),
+ message: __('Opening Stock Created Successfully: {1}',
+ [r.message, r.message]),
+ indicator: 'green'
+ });
+ frm.reload_doc();
+ }
+ }
+ });
+ }
+ });
+
+ dialog.show();
+ });
+ });
+
+ }
+});
diff --git a/aumms/aumms/doctype/aumms_item/aumms_item.json b/aumms/aumms/doctype/aumms_item/aumms_item.json
index 92c6a8ac..bf29a04b 100644
--- a/aumms/aumms/doctype/aumms_item/aumms_item.json
+++ b/aumms/aumms/doctype/aumms_item/aumms_item.json
@@ -93,7 +93,8 @@
"fieldname": "item_type",
"fieldtype": "Link",
"label": "Item Type",
- "options": "Item Type"
+ "options": "Item Type",
+ "reqd": 1
},
{
"default": "0",
@@ -132,7 +133,7 @@
},
{
"default": "0",
- "fetch_from": "item_group.is_purity_item",
+ "fetch_from": "item_type.is_purity_item",
"fieldname": "is_purity_item",
"fieldtype": "Check",
"hidden": 1,
@@ -368,7 +369,7 @@
],
"index_web_pages_for_search": 1,
"links": [],
- "modified": "2024-03-28 09:47:38.898756",
+ "modified": "2024-11-05 12:06:59.188117",
"modified_by": "Administrator",
"module": "AuMMS",
"name": "AuMMS Item",
diff --git a/aumms/aumms/doctype/aumms_item/aumms_item.py b/aumms/aumms/doctype/aumms_item/aumms_item.py
index 036ba79b..4926e48d 100644
--- a/aumms/aumms/doctype/aumms_item/aumms_item.py
+++ b/aumms/aumms/doctype/aumms_item/aumms_item.py
@@ -1,120 +1,219 @@
# Copyright (c) 2023, efeone and contributors
# For license information, please see license.txt
+import json
+
import frappe
from frappe.model.document import Document
-from frappe import _
+from frappe.utils import getdate
+
+# Fields used to map AuMMS Item to Item
+aumms_item_fields = [
+ "item_code",
+ "item_name",
+ "item_type",
+ "stock_uom",
+ "disabled",
+ "is_stock_item",
+ "making_charge_based_on",
+ "making_charge_percentage",
+ "making_charge",
+ "purity",
+ "purity_percentage",
+ "is_purity_item",
+ "description",
+ "weight_per_unit",
+ "weight_uom",
+ "is_purchase_item",
+ "purchase_uom",
+ "is_sales_item",
+ "sales_uom",
+ "gold_weight",
+ "has_stone",
+ "stone_weight",
+ "stone_charge",
+]
-#Fields used to map AuMMS Item to Item
-aumms_item_fields = ['item_code', 'item_name', 'item_type', 'stock_uom', 'disabled', 'is_stock_item', 'making_charge_based_on', 'making_charge_percentage', 'making_charge', 'purity', 'purity_percentage', 'is_purity_item', 'description', 'weight_per_unit', 'weight_uom', 'is_purchase_item', 'purchase_uom', 'is_sales_item', 'sales_uom', 'gold_weight', 'has_stone', 'stone_weight', 'stone_charge']
class AuMMSItem(Document):
- def validate(self):
- self.validate_gold_weight()
- ''' Method to validate Item name and Item Code '''
- """
+ def validate(self):
+ self.validate_gold_weight()
+ """ Method to validate Item name and Item Code """
+ """
self.validate_stone_weight()
self.validate_stone_charge()"""
- if self.is_new():
- self.validate_item_name()
- self.validate_item_code()
- self.validate_gross_wt_stone_wt_and_charge()
+ if self.is_new():
+ self.validate_item_name()
+ self.validate_item_code()
+ self.validate_gross_wt_stone_wt_and_charge()
- """def validate_stone_weight(self):
+ """def validate_stone_weight(self):
if not self.stone_weight and self.is_stone_item:
frappe.throw(_('Please Enter Stone weight'))
def validate_stone_charge(self):
if not self.stone_charge and self.is_stone_item:
frappe.throw(_('Please Enter Stone Charge'))"""
- def validate_gold_weight(self):
- if not self.gold_weight and not self.has_stone:
- frappe.throw("Gold Weight is mandatory")
-
- def after_insert(self):
- ''' Method to create Item from AuMMS Item '''
- self.create_or_update_item()
-
- def on_update(self):
- ''' Method to update created Item on changes of AuMMS Item '''
- self.create_or_update_item(self.item)
-
- def validate_item_name(self):
- ''' Method to validate AuMMS Item Name wrt to Item Name '''
- if self.item_name:
- if frappe.db.exists('Item', { 'item_name' : self.item_name }):
- frappe.throw('Item already exists with Item Name `{0}`.'.format(frappe.bold(self.item_name)))
-
- def validate_gross_wt_stone_wt_and_charge(self):
- ''' Method to validate AuMMS Item calculate missing wrt to Item Name '''
- if self.has_stone and (not self.stone_weight or self.stone_charge):
- stone_charge = 0
- stone_weight = 0
- for item in self.stone_details:
- stone_charge = + stone_charge + item.stone_charge
- stone_weight = + stone_weight + item.stone_weight
- self.stone_weight = stone_weight
- self.stone_charge = stone_charge
-
- if not self.weight_per_unit:
- if self.has_stone and self.gold_weight and self.stone_weight:
- self.weight_per_unit = self.gold_weight + self.stone_weight
- elif not self.has_stone and self.gold_weight:
- self.weight_per_unit = self.gold_weight
-
-
- def validate_item_code(self):
- ''' Method to validate AuMMS Item Code wrt to Item Code '''
- if self.item_code:
- if frappe.db.exists('Item', { 'item_code' : self.item_code }):
- frappe.throw('Item already exists with Item Code `{0}`.'.format(frappe.bold(self.item_code)))
-
- def create_or_update_item(self, item=None):
- ''' Method to create or update Item from AuMMS Item '''
- item_group = frappe.db.get_value('AuMMS Item Group', self.item_group, 'item_group')
- if not item:
- #Case of new Item
- if not frappe.db.exists('Item', self.name):
- #Creating new Item object
- item_doc = frappe.new_doc('Item')
- else:
- #Case of exception
- return 0
- else:
- #Case of existing Item
- if frappe.db.exists("Item", item):
- #Creating existing Item object
- item_doc = frappe.get_doc('Item', item)
- else:
- #Case of exception
- return 0
-
- # Check Item Group existance and set Item Group
- if item_group:
- item_doc.set('item_group', item_group)
-
- # Set values to Item from AuMMS Item
- for aumms_item_field in aumms_item_fields:
- item_doc.set(aumms_item_field, self.get(aumms_item_field))
-
- item_doc.is_aumms_item = 1
- item_doc.custom_is_raw_material = self.is_raw_material
-
-
- #Clear and Set UOMs to Item
- item_doc.uoms = []
- for uom in self.uoms:
- row = item_doc.append('uoms')
- row.uom = uom.uom
- row.conversion_factor = uom.conversion_factor
-
- if not item:
- # Case of new Item
- item_doc.insert(ignore_permissions = True)
- # Set Item Group link to AuMMS Item Group
- frappe.db.set_value('AuMMS Item', self.name, 'item', item_doc.name)
- elif frappe.db.exists("Item", item):
- # case of updating existing Item
- item_doc.save(ignore_permissions = True)
- frappe.db.commit()
+
+ def validate_gold_weight(self):
+ if not self.gold_weight and not self.is_stone_item:
+ frappe.throw("Gold Weight is mandatory")
+
+ def after_insert(self):
+ """Method to create Item from AuMMS Item"""
+ self.create_or_update_item()
+
+ def on_update(self):
+ """Method to update created Item on changes of AuMMS Item"""
+ self.create_or_update_item(self.item)
+
+ def validate_item_name(self):
+ """Method to validate AuMMS Item Name wrt to Item Name"""
+ if self.item_name:
+ if frappe.db.exists("Item", {"item_name": self.item_name}):
+ frappe.throw(
+ "Item already exists with Item Name `{0}`.".format(
+ frappe.bold(self.item_name)
+ )
+ )
+
+ def validate_gross_wt_stone_wt_and_charge(self):
+ """Method to validate AuMMS Item calculate missing wrt to Item Name"""
+ if self.has_stone and (not self.stone_weight or self.stone_charge):
+ stone_charge = 0
+ stone_weight = 0
+ for item in self.stone_details:
+ stone_charge = +stone_charge + item.stone_charge
+ stone_weight = +stone_weight + item.stone_weight
+ self.stone_weight = stone_weight
+ self.stone_charge = stone_charge
+
+ if not self.weight_per_unit:
+ if self.has_stone and self.gold_weight and self.stone_weight:
+ self.weight_per_unit = self.gold_weight + self.stone_weight
+ elif not self.has_stone and self.gold_weight:
+ self.weight_per_unit = self.gold_weight
+
+ def validate_item_code(self):
+ """Method to validate AuMMS Item Code wrt to Item Code"""
+ if self.item_code:
+ if frappe.db.exists("Item", {"item_code": self.item_code}):
+ frappe.throw(
+ "Item already exists with Item Code `{0}`.".format(
+ frappe.bold(self.item_code)
+ )
+ )
+
+ def create_or_update_item(self, item=None):
+ """Method to create or update Item from AuMMS Item"""
+ item_group = frappe.db.get_value(
+ "AuMMS Item Group", self.item_group, "item_group"
+ )
+ if not item:
+ # Case of new Item
+ if not frappe.db.exists("Item", self.name):
+ # Creating new Item object
+ item_doc = frappe.new_doc("Item")
+ else:
+ # Case of exception
+ return 0
+ else:
+ # Case of existing Item
+ if frappe.db.exists("Item", item):
+ # Creating existing Item object
+ item_doc = frappe.get_doc("Item", item)
+ else:
+ # Case of exception
+ return 0
+
+ # Check Item Group existance and set Item Group
+ if item_group:
+ item_doc.set("item_group", item_group)
+
+ # Set values to Item from AuMMS Item
+ for aumms_item_field in aumms_item_fields:
+ item_doc.set(aumms_item_field, self.get(aumms_item_field))
+
+ item_doc.is_aumms_item = 1
+ item_doc.custom_is_raw_material = self.is_raw_material
+
+ # Clear and Set UOMs to Item
+ item_doc.uoms = []
+ for uom in self.uoms:
+ row = item_doc.append("uoms")
+ row.uom = uom.uom
+ row.conversion_factor = uom.conversion_factor
+
+ if not item:
+ # Case of new Item
+ item_doc.insert(ignore_permissions=True)
+ # Set Item Group link to AuMMS Item Group
+ frappe.db.set_value("AuMMS Item", self.name, "item", item_doc.name)
+ elif frappe.db.exists("Item", item):
+ # case of updating existing Item
+ item_doc.save(ignore_permissions=True)
+ frappe.db.commit()
+
+
+@frappe.whitelist()
+def create_opening_stock_from_list(item_list_json):
+ item_list = json.loads(item_list_json)
+ frappe.enqueue(
+ create_opening_stock,
+ queue="default",
+ timeout=6000,
+ job_name="Opening Stock Creation",
+ at_front=True,
+ item_list=item_list,
+ )
+ return "Opening stock creation has been enqueued."
+
+
+
+@frappe.whitelist()
+def create_opening_stock(item_list, board_rate=None):
+ """
+ Function to create Opening Stock
+ """
+
+ warehouse = frappe.db.exists("Warehouse", {"name": ["like", "%Stores%"]})
+ account = frappe.db.exists("Account", {"name": ["like", "%Temporary Opening%"]})
+
+ if not warehouse or not account:
+ frappe.throw("Required Warehouse or Account not found.")
+
+ current_date = getdate()
+
+ aumms_item = frappe.get_doc("AuMMS Item", item_list)
+
+ # Fetch the actual board rate value using the `board_rate` field from the selected Board Rate document
+ if board_rate:
+ board_rate_value = frappe.db.get_value("Board Rate", board_rate, "board_rate")
+ board_rate = float(board_rate_value) if board_rate_value else 0
+ else:
+ board_rate = 0
+
+ try:
+ doc = frappe.new_doc("Stock Reconciliation")
+ doc.purpose = "Opening Stock"
+ doc.expense_account = account
+ doc.date = current_date
+
+ doc.append(
+ "items",
+ {
+ "item_code": aumms_item.item_code,
+ "warehouse": warehouse,
+ "qty": 1,
+ "valuation_rate": board_rate * aumms_item.gold_weight,
+ },
+ )
+
+
+ doc.insert(ignore_permissions=True)
+ return doc.name
+
+ except Exception as e:
+ frappe.log_error(frappe.get_traceback(), "Opening Stock Creation Error")
+ frappe.throw("An error occurred while creating the Opening Stock: {0}").format(str(e))
diff --git a/aumms/aumms/doctype/aumms_item/aumms_item_list.js b/aumms/aumms/doctype/aumms_item/aumms_item_list.js
new file mode 100644
index 00000000..65f1ff38
--- /dev/null
+++ b/aumms/aumms/doctype/aumms_item/aumms_item_list.js
@@ -0,0 +1,22 @@
+frappe.listview_settings["AuMMS Item"] = {
+ refresh: function (listview) {
+ listview.page.add_actions_menu_item(
+ __("Create Opening Stock"),
+ function () {
+ let docnames = listview.get_checked_items(true);
+ frappe.call({
+ method:
+ "aumms.aumms.doctype.aumms_item.aumms_item.create_opening_stock_from_list",
+ args: {
+ item_list_json: JSON.stringify(docnames), // Convert list to JSON string
+ },
+ callback: function (r) {
+ if (r.message) {
+ console.log(r.message);
+ }
+ },
+ });
+ }
+ );
+ },
+};
diff --git a/aumms/aumms/doctype/item_wise_stone_details/__init__.py b/aumms/aumms/doctype/item_wise_stone_details/__init__.py
new file mode 100644
index 00000000..e69de29b
diff --git a/aumms/aumms/doctype/item_wise_stone_details/item_wise_stone_details.json b/aumms/aumms/doctype/item_wise_stone_details/item_wise_stone_details.json
new file mode 100644
index 00000000..f26f6885
--- /dev/null
+++ b/aumms/aumms/doctype/item_wise_stone_details/item_wise_stone_details.json
@@ -0,0 +1,68 @@
+{
+ "actions": [],
+ "allow_rename": 1,
+ "creation": "2024-08-20 10:05:13.872227",
+ "doctype": "DocType",
+ "editable_grid": 1,
+ "engine": "InnoDB",
+ "field_order": [
+ "reference",
+ "stone",
+ "uom",
+ "stone_weight",
+ "rate",
+ "amount"
+ ],
+ "fields": [
+ {
+ "fieldname": "reference",
+ "fieldtype": "Data",
+ "in_list_view": 1,
+ "label": "Reference"
+ },
+ {
+ "fieldname": "stone",
+ "fieldtype": "Link",
+ "in_list_view": 1,
+ "label": "Stone",
+ "options": "AuMMS Item"
+ },
+ {
+ "fieldname": "uom",
+ "fieldtype": "Link",
+ "in_list_view": 1,
+ "label": "UOM",
+ "options": "UOM"
+ },
+ {
+ "fieldname": "stone_weight",
+ "fieldtype": "Float",
+ "in_list_view": 1,
+ "label": "Stone Weight"
+ },
+ {
+ "fieldname": "rate",
+ "fieldtype": "Currency",
+ "in_list_view": 1,
+ "label": "Rate"
+ },
+ {
+ "fieldname": "amount",
+ "fieldtype": "Currency",
+ "in_list_view": 1,
+ "label": "Amount"
+ }
+ ],
+ "index_web_pages_for_search": 1,
+ "istable": 1,
+ "links": [],
+ "modified": "2024-08-20 10:07:11.991708",
+ "modified_by": "Administrator",
+ "module": "AuMMS",
+ "name": "Item Wise Stone Details",
+ "owner": "Administrator",
+ "permissions": [],
+ "sort_field": "modified",
+ "sort_order": "DESC",
+ "states": []
+}
\ No newline at end of file
diff --git a/aumms/aumms/doctype/item_wise_stone_details/item_wise_stone_details.py b/aumms/aumms/doctype/item_wise_stone_details/item_wise_stone_details.py
new file mode 100644
index 00000000..653850f9
--- /dev/null
+++ b/aumms/aumms/doctype/item_wise_stone_details/item_wise_stone_details.py
@@ -0,0 +1,9 @@
+# Copyright (c) 2024, efeone and contributors
+# For license information, please see license.txt
+
+# import frappe
+from frappe.model.document import Document
+
+
+class ItemWiseStoneDetails(Document):
+ pass
diff --git a/aumms/aumms/doctype/jewellery_invoice/jewellery_invoice.js b/aumms/aumms/doctype/jewellery_invoice/jewellery_invoice.js
index 7b442cd9..16cb1b8c 100644
--- a/aumms/aumms/doctype/jewellery_invoice/jewellery_invoice.js
+++ b/aumms/aumms/doctype/jewellery_invoice/jewellery_invoice.js
@@ -32,19 +32,7 @@ frappe.ui.form.on('Jewellery Invoice', {
})
}
},
- validate: function(frm){
- set_totals(frm);
- },
- disable_rounded_total: function(frm){
- if(frm.doc.disable_rounded_total){
- frm.set_value('rounding_adjustment', 0);
- }
- else{
- frm.set_value('rounded_total', Math.round(frm.doc.grand_total));
- frm.set_value('rounding_adjustment', frm.doc.rounded_total - frm.doc.grand_total);
- }
- frm.set_value('rounded_total', frm.doc.grand_total+frm.doc.rounding_adjustment);
- },
+
delivery_date: function(frm){
if(frm.doc.delivery_date){
set_missing_delivery_dates(frm);
@@ -99,7 +87,9 @@ frappe.ui.form.on('Jewellery Invoice', {
frappe.ui.form.on('Old Jewellery Item', {
item_code: function(frm, cdt, cdn) {
let d = locals[cdt][cdn];
+
if (d.item_code && d.purity && d.stock_uom) {
+
frappe.call({
method: 'aumms.aumms.utils.get_board_rate',
args: {
@@ -151,52 +141,9 @@ frappe.ui.form.on('Old Jewellery Item', {
}
});
+
frappe.ui.form.on('Jewellery Invoice Item', {
- item_code: function(frm, cdt, cdn){
- let d = locals[cdt][cdn];
- if (d.item_code){
- if(frm.doc.delivery_date){
- frappe.model.set_value(d.doctype, d.name, 'delivery_date', frm.doc.delivery_date);
- }
- if (d.is_purity_item){
- frappe.call({
- // Method for fetching gold_weight, making_charge_percentage, making_charge & board_rate
- method: 'aumms.aumms.doc_events.sales_order.get_item_details',
- args: {
- 'item_code': d.item_code,
- 'item_type': d.item_type,
- 'date': frm.doc.transaction_date,
- 'purity': d.purity,
- 'stock_uom': d.stock_uom
- },
- callback: function(r) {
- if (r.message){
- frappe.model.set_value(d.doctype, d.name, 'gold_weight', r.message['gold_weight']);
- frappe.model.set_value(d.doctype, d.name, 'stone_weight', r.message['stone_weight']);
- frappe.model.set_value(d.doctype, d.name, 'net_weight', r.message['net_weight']);
- frappe.model.set_value(d.doctype, d.name, 'stone_charge', r.message['stone_charge']);
- frappe.model.set_value(d.doctype, d.name, 'making_charge_percentage', r.message['making_charge_percentage']);
- frappe.model.set_value(d.doctype, d.name, 'is_fixed_making_charge', r.message['making_charge']);
- frappe.model.set_value(d.doctype, d.name, 'board_rate', r.message['board_rate']);
- frappe.model.set_value(d.doctype, d.name, 'making_charge_based_on', r.message['making_charge_based_on']);
- frappe.model.set_value(d.doctype, d.name, 'making_charge_percentage', r.message['making_charge_percentage']);
- frappe.model.set_value(d.doctype, d.name, 'amount_with_out_making_charge', r.message['gold_weight'] * r.message['board_rate']);
- frappe.model.set_value(d.doctype, d.name, 'net_amount_with_out_making_charge', (r.message['gold_weight'] * r.message['board_rate']) + r.message['stone_charge']);
- if (r.message['making_charge']){
- frappe.model.set_value(d.doctype, d.name, 'making_charge', r.message['making_charge']);
- }
- else {
- //set making_charge if it's percentage
- frappe.model.set_value(d.doctype, d.name, 'making_charge', (d.amount_with_out_making_charge)*(d.making_charge_percentage * 0.01));
- }
- frappe.model.set_value(d.doctype, d.name, 'rate', (d.net_amount_with_out_making_charge + d.making_charge)/d.gold_weight);
- frm.refresh_field('items');
- }
- }
- })
- }
- }
- },
+
gold_weight: function(frm, cdt, cdn){
let d = locals[cdt][cdn];
let total_gold_weight;
@@ -224,7 +171,7 @@ frappe.ui.form.on('Jewellery Invoice Item', {
},
amount: function(frm, cdt, cdn) {
set_net_weight_and_amount(frm);
- set_totals(frm);
+ // set_totals(frm);
},
making_charge_percentage: function(frm, cdt, cdn){
let d = locals[cdt][cdn];
@@ -239,7 +186,7 @@ frappe.ui.form.on('Jewellery Invoice Item', {
let d = locals[cdt][cdn];
if (d.amount_with_out_making_charge){
frappe.model.set_value(d.doctype, d.name, 'net_amount_with_out_making_charge', d.amount_with_out_making_charge + d.stone_charge);
- var making_charge = d.amount_with_out_making_charge * d.making_charge_percentage * 0.01
+ let making_charge = d.amount_with_out_making_charge * d.making_charge_percentage * 0.01
frappe.model.set_value(d.doctype, d.name, 'making_charge', making_charge);//set making_charge while changing of amount_with_out_making_charge
let rate = (d.net_amount_with_out_making_charge + d.making_charge)/d.gold_weight
if (rate)
@@ -299,11 +246,11 @@ frappe.ui.form.on('Jewellery Invoice Item', {
frappe.model.set_value(child.doctype, child.name, 'delivery_date', frm.doc.delivery_date);
}
frm.refresh_field('items');
- set_totals(frm);
+ // set_totals(frm);
set_net_weight_and_amount(frm);
},
items_remove: function(frm, cdt, cdn) {
- set_totals(frm);
+ // set_totals(frm);
set_net_weight_and_amount(frm);
}
});
@@ -315,7 +262,7 @@ let set_item_details = function(frm, child) {
method : 'aumms.aumms.utils.get_board_rate',
args: {
item_type: child.item_type,
- date: cur_frm.doc.transaction_date,
+ date: frm.doc.transaction_date,
stock_uom: child.stock_uom,
purity: child.purity
},
@@ -376,55 +323,49 @@ let set_filters = function(frm){
});
}
-let set_totals = function(frm){
- let total = 0;
- if(frm.doc.items){
- frm.doc.items.forEach((child) => {
- if(child.amount){
- total = total + child.amount;
- }
- });
- }
- frm.set_value('grand_total', total);
- frm.set_value('rounded_total', total);
- frm.refresh_fields();
-}
-let set_net_weight_and_amount = function(frm){
+let set_net_weight_and_amount = function(frm) {
let total_old_gold_weight = 0;
let total_gold_weight = 0;
let total_old_gold_amount = 0;
- let total_gold_amount = 0;
+ let total_gold_amount = 0;
let balance_amount = 0;
- if(frm.doc.items){
+
+ if (frm.doc.items) {
frm.doc.items.forEach((child) => {
- if(child.gold_weight){
- total_gold_weight = total_gold_weight + child.gold_weight;
+ if (child.gold_weight) {
+ total_gold_weight += child.gold_weight;
}
- if(child.amount){
- total_gold_amount = total_gold_amount + child.amount;
+ if (typeof child.amount === 'number' && !isNaN(child.amount)) { // Check if amount is a valid number
+ total_gold_amount += child.amount; // Calculate total_gold_amount
}
});
}
- if(frm.doc.transaction_type!='Sales' && frm.doc.old_jewellery_items){
+
+ if (frm.doc.transaction_type !== 'Sales' && frm.doc.old_jewellery_items) {
frm.doc.old_jewellery_items.forEach((child) => {
- if(child.weight){
- total_old_gold_weight = total_old_gold_weight + child.weight;
+ if (child.weight) {
+ total_old_gold_weight += child.weight;
}
- if(child.amount){
- total_old_gold_amount = total_old_gold_amount + child.amount;
+ if (typeof child.amount === 'number' && !isNaN(child.amount)) { // Check if amount is a valid number
+ total_old_gold_amount += child.amount;
}
});
}
- balance_amount = total_gold_amount - total_old_gold_amount
+
+ balance_amount = total_gold_amount - total_old_gold_amount;
+
+ // Set values in the form
frm.set_value('total_gold_weight', total_gold_weight);
frm.set_value('total_gold_amount', total_gold_amount);
frm.set_value('total_old_gold_weight', total_old_gold_weight);
frm.set_value('total_old_gold_amount', total_old_gold_amount);
frm.set_value('balance_amount', balance_amount);
+
frm.refresh_fields();
}
+
let set_missing_delivery_dates = function(frm){
if(frm.doc.items){
frm.doc.items.forEach((child) => {
@@ -455,13 +396,6 @@ let create_custom_buttons = function(frm){
});
}, 'Create');
}
- // if (frm.doc.sales_invoice && !frm.doc.metal_ledger_entry){
- // frappe.call('aumms.aumms.aumms.utils.create_metal_ledger_entries', {
- // doc : frm.doc.sales_invoice
- // }).then(r => {
- // frm.reload_doc();
- // });
- // }
if(frm.doc.sales_invoice && !frm.doc.delivery_note && !frm.doc.delivered){
frm.add_custom_button('Delivery Note', () => {
@@ -623,3 +557,330 @@ let get_customer_advances= function(frm){
});
});
}
+
+
+
+// code to fetch the Item details
+
+frappe.ui.form.on('Jewellery Invoice Item', {
+ item_code: function(frm, cdt, cdn) {
+ let d = locals[cdt][cdn];
+
+ if (d.item_code) {
+
+ if (frm.doc.delivery_date) {
+ frappe.model.set_value(d.doctype, d.name, 'delivery_date', frm.doc.delivery_date);
+ }
+
+ // Step 1: Fetch making_charge
+ fetch_and_set_making_charge(frm, d);
+
+ // Step 2: Fetch item details for purity items
+ if (d.is_purity_item) {
+ frappe.call({
+ method: 'aumms.aumms.doc_events.sales_order.get_item_details',
+ args: {
+ 'item_code': d.item_code,
+ 'item_type': d.item_type,
+ 'date': frm.doc.transaction_date,
+ 'purity': d.purity,
+ 'stock_uom': d.stock_uom
+ },
+ callback: function(r) {
+ if (r.message) {
+ frappe.model.set_value(d.doctype, d.name, 'gold_weight', r.message['gold_weight']);
+ frappe.model.set_value(d.doctype, d.name, 'stone_weight', r.message['stone_weight']);
+ frappe.model.set_value(d.doctype, d.name, 'net_weight', r.message['net_weight']);
+ frappe.model.set_value(d.doctype, d.name, 'stone_charge', r.message['stone_charge']);
+ frappe.model.set_value(d.doctype, d.name, 'making_charge_percentage', r.message['making_charge_percentage']);
+ frappe.model.set_value(d.doctype, d.name, 'board_rate', r.message['board_rate']);
+ frappe.model.set_value(d.doctype, d.name, 'making_charge_based_on', r.message['making_charge_based_on']);
+
+ // Calculate amount without making charge
+ let amount_without_making_charge = r.message['gold_weight'] * r.message['board_rate'];
+ frappe.model.set_value(d.doctype, d.name, 'amount_with_out_making_charge', amount_without_making_charge);
+
+ // Calculate net amount without making charge
+ let net_amount_without_making_charge = amount_without_making_charge + r.message['stone_charge'];
+ frappe.model.set_value(d.doctype, d.name, 'net_amount_with_out_making_charge', net_amount_without_making_charge);
+
+ // Set rate using the making_charge already fetched earlier
+ let making_charge = d.making_charge || 0;
+ let total_rate = (net_amount_without_making_charge + making_charge) / r.message['gold_weight'];
+ frappe.model.set_value(d.doctype, d.name, 'rate', total_rate);
+
+ frm.refresh_field('items');
+ }
+ }
+ });
+ }
+
+ // Step 3: Fetch board_rate
+ if (d.purity && d.stock_uom) {
+ frappe.call({
+ method: 'aumms.aumms.utils.get_board_rate',
+ args: {
+ 'item_type': d.item_type,
+ 'date': frm.doc.transaction_date,
+ 'purity': d.purity,
+ 'stock_uom': d.stock_uom
+ },
+ callback: function(r) {
+ if (r.message) {
+ let board_rate = r.message;
+ frappe.model.set_value(d.doctype, d.name, 'board_rate', board_rate);
+ frm.refresh_field('items');
+ }
+ }
+ });
+ }
+ }
+ }
+});
+
+// // discount
+
+frappe.ui.form.on('Stone Details - 2', {
+ discount: function(frm, cdt, cdn) {
+ calculate_discount_and_total(frm, cdt, cdn);
+ },
+ stone_weight: function(frm, cdt, cdn) {
+ calculate_discount_and_total(frm, cdt, cdn);
+ }
+
+});
+
+function calculate_discount_and_total(frm, cdt, cdn) {
+ let row = locals[cdt][cdn];
+ let final_amount;
+
+ if (row.discount && flt(row.discount) !== 0) {
+ final_amount = flt(row.stone_charge) * (1 - flt(row.discount) / 100);
+ } else {
+ final_amount = flt(row.stone_charge);
+ }
+
+ // Update the row's final amount
+ frappe.model.set_value(cdt, cdn, 'custom_discount_final', final_amount);
+
+ // Calculate total by checking each row
+ let total = frm.doc.stone_details.reduce((sum, r) => {
+ if (r.discount && flt(r.discount) !== 0) {
+ return sum + flt(r.stone_charge) * (1 - flt(r.discount) / 100);
+ } else {
+ return sum + flt(r.stone_charge);
+ }
+ }, 0);
+
+ frm.set_value('custom_discount_final', total);
+ frm.refresh_fields(['stone_details', 'custom_discount_final']);
+}
+
+
+
+
+// code to set Grand Total
+
+frappe.ui.form.on('Jewellery Invoice', {
+ items: {
+ board_rate: calculate_total,
+ gold_weight: calculate_total,
+ making_charge: calculate_total,
+ items_add: calculate_total,
+ items_remove: calculate_total
+ },
+ custom_discount_final: function(frm) {
+ calculate_total(frm);
+ },
+ total_gold_amount: function(frm) {
+ calculate_total(frm);
+ }
+});
+
+function calculate_total(frm) {
+ let total_amount = 0;
+ let discount = frm.doc.custom_discount_final || 0;
+
+ frm.doc.items.forEach(function(item) {
+ total_amount += (item.board_rate || 0) * (item.gold_weight || 0) + (item.making_charge || 0);
+ });
+ console.log(total_amount);
+
+
+ frm.set_value('grand_total', total_amount + discount);
+ frm.set_value('rounded_total', grand_total)
+
+}
+
+
+
+// code for stone details and discount
+frappe.ui.form.on('Jewellery Invoice Item', {
+ item_code: function(frm, cdt, cdn) {
+ let row = locals[cdt][cdn];
+ if (!row.item_code) return;
+
+ fetch_and_add_stone_details(frm, row);
+ }
+});
+
+// Fetch stone details from AuMMS Item
+function fetch_and_add_stone_details(frm, row) {
+ frappe.call({
+ method: "frappe.client.get",
+ args: {
+ doctype: "AuMMS Item",
+ name: row.item_code
+ },
+ callback: function(r) {
+ if (!r.message) {
+ frappe.msgprint('No item details found');
+ return;
+ }
+
+ let stone_details = r.message.stone_details || [];
+ add_stone_details_to_table(frm, row.item_code, stone_details);
+
+ if (frm.doc.customer) {
+ apply_pricing_rules(frm);
+ }
+ }
+ });
+}
+
+// Add stone details to child table
+function add_stone_details_to_table(frm, item_code, stone_details) {
+
+ stone_details.forEach(function(row) {
+ let child = frm.add_child('stone_details');
+ child.item_code = item_code;
+ child.item_name = row.item_name;
+ child.stone_type = row.stone_type;
+ child.stone_weight = row.stone_weight;
+ child.stone_charge = row.stone_charge;
+ });
+
+ frm.refresh_field('stone_details');
+}
+
+// Apply pricing rules based on customer
+
+function apply_pricing_rules(frm) {
+ frappe.call({
+ method: "aumms.aumms.doctype.jewellery_invoice.jewellery_invoice.get_pricing_rule_and_items",
+ args: {
+ customer: frm.doc.customer
+ },
+ callback: function(r) {
+ let discount_percentage = 0;
+ let rule_items = [];
+
+ if (r.message) {
+ discount_percentage = r.message.discount_percentage || 0;
+ rule_items = r.message.rule_items || [];
+ }
+
+ update_stone_discounts(frm, discount_percentage, rule_items);
+ }
+ });
+}
+
+// Update discounts
+function update_stone_discounts(frm, discount_percentage, rule_items) {
+ frm.doc.stone_details.forEach(function(stone) {
+
+ let matched_item = rule_items.find(function(item) {
+ return item.item_code === stone.item_name;
+ });
+
+ // Apply discount if matched; otherwise, set discount to 0
+ frappe.model.set_value(
+ stone.doctype,
+ stone.name,
+ 'discount',
+ matched_item ? discount_percentage : 0
+ );
+ });
+
+ frm.refresh_field('stone_details');
+}
+
+
+
+
+
+// fetch making charge
+frappe.ui.form.on('Jewellery Invoice Item', {
+ item_code: function(frm, cdt, cdn) {
+ let row = locals[cdt][cdn];
+ if (!row.item_code) {
+ frappe.msgprint('Please select an Item Code');
+ return;
+ }
+
+ fetch_and_set_making_charge(frm, row);
+ }
+});
+
+function fetch_and_set_making_charge(frm, row) {
+ frappe.call({
+ method: "aumms.aumms.doctype.jewellery_invoice.jewellery_invoice.get_making_charge",
+ args: {
+ item_code: row.item_code
+ },
+ callback: function(r) {
+ if (!r.message) {
+ return;
+ }
+
+ update_making_charge(frm, row, r.message);
+ },
+ });
+}
+
+// Update the making charge in the row
+function update_making_charge(frm, row, making_charge) {
+ frappe.model.set_value(
+ row.doctype,
+ row.name,
+ 'making_charge',
+ making_charge
+ );
+
+ frm.refresh_field('items');
+}
+
+
+// code for discounted amount
+
+frappe.ui.form.on("Jewellery Invoice", {
+ refresh: function(frm) {
+ calculate_discounted_stone_charge_and_print(frm);
+ }
+});
+
+frappe.ui.form.on("Stone Details - 2", {
+ stone_charge: function(frm, cdt, cdn) {
+ calculate_discounted_stone_charge_and_print(frm);
+ },
+ stone_details_add: function(frm) {
+ calculate_discounted_stone_charge_and_print(frm);
+ },
+ custom_discount_final: function(frm) {
+ calculate_discounted_stone_charge_and_print(frm);
+ }
+});
+
+function calculate_discounted_stone_charge_and_print(frm) {
+ let total_stone_charge = 0;
+
+ if (frm.doc.stone_details && frm.doc.stone_details.length) {
+ frm.doc.stone_details.forEach(row => {
+ let stone_charge = row.stone_charge || 0;
+ total_stone_charge += stone_charge ;
+ });
+ }
+ let discount = total_stone_charge - frm.doc.custom_discount_final || 0;
+
+ frm.set_value("discount_amount", discount);
+}
diff --git a/aumms/aumms/doctype/jewellery_invoice/jewellery_invoice.json b/aumms/aumms/doctype/jewellery_invoice/jewellery_invoice.json
index ddb48659..02a59fe5 100644
--- a/aumms/aumms/doctype/jewellery_invoice/jewellery_invoice.json
+++ b/aumms/aumms/doctype/jewellery_invoice/jewellery_invoice.json
@@ -20,6 +20,7 @@
"old_jewellery_items",
"items_section",
"items",
+ "stone_details",
"section_break_ypbyf",
"total_old_gold_weight",
"total_gold_weight",
@@ -400,13 +401,19 @@
"fieldtype": "Link",
"label": "Sales Taxes and Charges Template",
"options": "Sales Taxes and Charges Template"
+ },
+ {
+ "fieldname": "stone_details",
+ "fieldtype": "Table",
+ "label": "Stone Details",
+ "options": "Stone Details - 2"
}
],
"hide_toolbar": 1,
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
- "modified": "2024-02-03 11:58:01.263231",
+ "modified": "2024-11-08 15:09:59.576364",
"modified_by": "Administrator",
"module": "AuMMS",
"name": "Jewellery Invoice",
diff --git a/aumms/aumms/doctype/jewellery_invoice/jewellery_invoice.py b/aumms/aumms/doctype/jewellery_invoice/jewellery_invoice.py
index 890b876b..53fc8e95 100644
--- a/aumms/aumms/doctype/jewellery_invoice/jewellery_invoice.py
+++ b/aumms/aumms/doctype/jewellery_invoice/jewellery_invoice.py
@@ -57,12 +57,11 @@ def set_total_amount(self):
if item.amount is not None:
amount += item.amount
currency = self.currency
- self.grand_total = amount
if self.disable_rounded_total:
- self.rounded_total = amount
+ # self.rounded_total = amount
self.rounding_adjustment = 0
else:
- self.rounded_total = round(amount)
+ self.rounded_total = round(self.grand_total)
self.rounding_adjustment = self.rounded_total - amount
self.in_words = money_in_words(self.rounded_total, currency)
self.outstanding_amount = self.rounded_total - self.paid_amount
@@ -152,6 +151,12 @@ def set_missing_values(source, target):
},
},
}, target_doc, set_missing_values)
+ # Setting the discount amount
+ try:
+ Jewellery = frappe.get_doc("Jewellery Invoice", source_name)
+ target_doc.discount_amount = abs(Jewellery.rounding_adjustment)
+ except Exception as e:
+ frappe.log_error("ERROR OCCURED", e)
target_doc.submit()
frappe.msgprint(('Sales Order created'), indicator="green", alert=1)
frappe.db.commit()
@@ -412,9 +417,11 @@ def get_board_rate(old_item, transaction_date):
# Fetch the boardrate from the 'Board Rate' doctype
board_rate = frappe.db.get_value('Board Rate', {'old_item': old_item, 'valid_from': ('<=', transaction_date)},
'board_rate', order_by='valid_from desc', as_dict=True)
+ print(board_rate)
return {'board_rate': board_rate}
+
@frappe.whitelist()
def create_delivery_note(source_name, jewellery_invoice, target_doc=None):
''' Method to create Delivery Note from Jewellery Invoice with Sales Invoice reference '''
@@ -494,3 +501,47 @@ def get_sales_taxes_and_charges_details(sales_taxes_and_charges_template, total_
total_taxes_and_charges += tax_amount
return custom_sales_taxes_and_charges
+
+
+@frappe.whitelist()
+def get_making_charge(item_code):
+ """
+ Fetches the making_charge for a given item_code from the AuMMS Item doctype.
+ """
+ if item_code:
+
+ making_charge = frappe.db.get_value('AuMMS Item', {'item_code': item_code}, 'making_charge')
+ return making_charge if making_charge else 0
+ return 0
+
+
+
+@frappe.whitelist()
+def get_pricing_rule_and_items(customer):
+ """Fetches the discount percentage and items from Pricing Rule Doctype based on Customer"""
+
+ pricing_rule = frappe.db.get_list(
+ "Pricing Rule",
+ filters={"customer": customer, "disable": 0},
+ fields=["name", "discount_percentage"],
+ limit=1
+ )
+
+ if pricing_rule:
+ pricing_rule_name = pricing_rule[0].name
+ discount_percentage = pricing_rule[0].discount_percentage if pricing_rule[0].discount_percentage else 0
+
+ rule_items = frappe.get_all(
+ "Pricing Rule Item Code",
+ filters={"parent": pricing_rule_name},
+ fields=["item_code"]
+ )
+
+ # Return the discount percentage and the list of item codes
+ return {
+ "discount_percentage": discount_percentage,
+ "rule_items": rule_items
+ }
+
+ return {}
+
diff --git a/aumms/aumms/doctype/jewellery_item_receipt/jewellery_item_receipt.json b/aumms/aumms/doctype/jewellery_item_receipt/jewellery_item_receipt.json
index 74b10fcd..c2160410 100644
--- a/aumms/aumms/doctype/jewellery_item_receipt/jewellery_item_receipt.json
+++ b/aumms/aumms/doctype/jewellery_item_receipt/jewellery_item_receipt.json
@@ -11,18 +11,10 @@
"item_code",
"item_type",
"item_group",
- "has_stone",
- "single_stone",
- "multi_stone",
- "stone",
- "add_multi_stone",
- "stones",
"gold_weight",
"uom",
- "unit_stone_charge",
- "stone_weight",
- "individual_stone_weight",
"column_break_juco",
+ "stone_weight_gold_weight_uom",
"net_weight",
"stone_charge",
"making_chargein_percentage",
@@ -30,7 +22,20 @@
"purity",
"board_rate",
"amount_without_making_charge",
- "amount"
+ "amount",
+ "hallmarked",
+ "is_sales_item",
+ "huid",
+ "section_break_lkhd",
+ "has_stone",
+ "stone",
+ "stone_weight",
+ "stone_uom",
+ "rate",
+ "add_stone",
+ "column_break_piui",
+ "stones",
+ "individual_stone_weight"
],
"fields": [
{
@@ -54,10 +59,9 @@
"reqd": 1
},
{
- "depends_on": "eval:doc.stone",
+ "depends_on": "eval:doc.has_stone",
"fieldname": "stone_weight",
"fieldtype": "Float",
- "in_list_view": 1,
"label": "Stone Weight",
"precision": "2"
},
@@ -72,7 +76,7 @@
"fieldtype": "Column Break"
},
{
- "depends_on": "eval:doc.single_stone == 1",
+ "depends_on": "eval:doc.has_stone",
"fieldname": "stone",
"fieldtype": "Link",
"label": "Stone",
@@ -104,7 +108,7 @@
"default": "0",
"fieldname": "has_stone",
"fieldtype": "Check",
- "label": "has Stone"
+ "label": "Has Stone"
},
{
"fieldname": "amount_without_making_charge",
@@ -119,12 +123,6 @@
"precision": "1",
"reqd": 1
},
- {
- "depends_on": "eval:doc.has_stone == 1",
- "fieldname": "unit_stone_charge",
- "fieldtype": "Int",
- "label": "Unit Stone Charge"
- },
{
"fieldname": "individual_stone_weight",
"fieldtype": "Data",
@@ -165,19 +163,7 @@
"precision": "2"
},
{
- "default": "0",
- "depends_on": "eval:doc.has_stone && !doc.multi_stone == 1",
- "fieldname": "single_stone",
- "fieldtype": "Check",
- "label": "Single Stone"
- },
- {
- "depends_on": "eval:doc.has_stone && doc.multi_stone == 1",
- "fieldname": "add_multi_stone",
- "fieldtype": "Button",
- "label": "Add Multi Stone"
- },
- {
+ "default": "Gram",
"fieldname": "uom",
"fieldtype": "Link",
"label": "UOM",
@@ -185,23 +171,69 @@
"reqd": 1
},
{
- "depends_on": "eval:doc.has_stone && doc.multi_stone == 1",
+ "depends_on": "eval:doc.has_stone",
"fieldname": "stones",
"fieldtype": "Data",
"label": "Stones"
},
+ {
+ "fieldname": "section_break_lkhd",
+ "fieldtype": "Section Break"
+ },
+ {
+ "depends_on": "eval:doc.has_stone",
+ "fieldname": "add_stone",
+ "fieldtype": "Button",
+ "label": "Add Stone"
+ },
+ {
+ "fieldname": "column_break_piui",
+ "fieldtype": "Column Break"
+ },
+ {
+ "fieldname": "stone_weight_gold_weight_uom",
+ "fieldtype": "Float",
+ "in_list_view": 1,
+ "label": "Stone Weight (Gold Weight UOM)"
+ },
+ {
+ "default": "Gram",
+ "depends_on": "eval: doc.has_stone",
+ "fieldname": "stone_uom",
+ "fieldtype": "Link",
+ "label": "UOM",
+ "options": "UOM"
+ },
+ {
+ "depends_on": "eval: doc.has_stone",
+ "fieldname": "rate",
+ "fieldtype": "Currency",
+ "label": "Rate"
+ },
+ {
+ "default": "0",
+ "fieldname": "hallmarked",
+ "fieldtype": "Check",
+ "label": "Hallmarked"
+ },
+ {
+ "depends_on": "eval: doc.hallmarked",
+ "fieldname": "huid",
+ "fieldtype": "Data",
+ "label": "HUID",
+ "mandatory_depends_on": "eval: doc.hallmarked"
+ },
{
"default": "0",
- "depends_on": "eval:doc.has_stone && !doc.single_stone == 1",
- "fieldname": "multi_stone",
+ "fieldname": "is_sales_item",
"fieldtype": "Check",
- "label": "Multi Stone"
+ "label": "Is Sales Item"
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
- "modified": "2024-03-20 11:55:02.622652",
+ "modified": "2024-11-07 14:25:09.197843",
"modified_by": "Administrator",
"module": "AuMMS",
"name": "Jewellery Item Receipt",
diff --git a/aumms/aumms/doctype/jewellery_receipt/jewellery_receipt.js b/aumms/aumms/doctype/jewellery_receipt/jewellery_receipt.js
index f4d6dead..c631223f 100644
--- a/aumms/aumms/doctype/jewellery_receipt/jewellery_receipt.js
+++ b/aumms/aumms/doctype/jewellery_receipt/jewellery_receipt.js
@@ -1,229 +1,292 @@
frappe.ui.form.on("Jewellery Receipt", {
setup: function (frm) {
- frm.set_query('uom', 'item_details', () => {
- return {
- filters: {
- "is_purity_uom": 1
- }
- }
- });
+ frm.set_query("uom", "item_details", () => {
+ return {
+ filters: {
+ is_purity_uom: 1,
+ },
+ };
+ });
},
- refresh:function(frm) {
- frm.set_query('stone', 'item_details', () => {
+ refresh: function (frm) {
+ frm.set_query("stone", "item_details", () => {
return {
filters: {
- "is_stone_item": 1
- }
- }
- })
+ is_stone_item: 1,
+ },
+ };
+ });
+ },
+ item_category: function (frm) {
+ frm.events.update_item_details_table(frm);
},
- item_category: function(frm) {
+ item_type: function (frm) {
frm.events.update_item_details_table(frm);
+ item_group_filters(frm);
},
- item_type: function(frm) {
+ item_group: function (frm) {
frm.events.update_item_details_table(frm);
},
- item_group:function(frm) {
+ purity: function (frm) {
frm.events.update_item_details_table(frm);
},
- purity: function(frm) {
+ board_rate: function (frm) {
frm.events.update_item_details_table(frm);
},
- board_rate: function(frm) {
+ supplier: function (frm) {
frm.events.update_item_details_table(frm);
},
- update_item_details_table: function(frm){
- if(frm.doc.item_details){
- frm.doc.item_details.forEach(function(item){
- frappe.model.set_value(item.doctype, item.name, 'item_category', frm.doc.item_category);
- frappe.model.set_value(item.doctype, item.name, 'item_type', frm.doc.item_type);
- frappe.model.set_value(item.doctype, item.name, 'item_group', frm.doc.item_group);
- frappe.model.set_value(item.doctype, item.name, 'purity', frm.doc.purity);
- frappe.model.set_value(item.doctype, item.name, 'board_rate', frm.doc.board_rate);
+ update_item_details_table: function (frm) {
+ if (frm.doc.item_details) {
+ let making_charge = 0;
- });
+ const updateItems = () => {
+ frm.doc.item_details.forEach(function (item) {
+ frappe.model.set_value(
+ item.doctype,
+ item.name,
+ "item_category",
+ frm.doc.item_category
+ );
+ frappe.model.set_value(
+ item.doctype,
+ item.name,
+ "item_type",
+ frm.doc.item_type
+ );
+ frappe.model.set_value(
+ item.doctype,
+ item.name,
+ "item_group",
+ frm.doc.item_group
+ );
+ frappe.model.set_value(
+ item.doctype,
+ item.name,
+ "purity",
+ frm.doc.purity
+ );
+ frappe.model.set_value(
+ item.doctype,
+ item.name,
+ "board_rate",
+ frm.doc.board_rate
+ );
+ frappe.model.set_value(
+ item.doctype,
+ item.name,
+ "making_chargein_percentage",
+ making_charge
+ );
+ });
+ frm.refresh_fields();
+ };
+
+ updateItems();
}
- frm.refresh_fields();
},
- // has_stone: function (frm) {
- // if(!frm.doc.has_stone){
- // frm.set_value('stone', );
- // }
- // frm.fields_dict.item_details.grid.toggle_enable('has_stone', frm.doc.has_stone);
- // frm.refresh_fields();
- // frm.trigger('update_item_details');
- // },
- // stone: function(frm){
- // frm.trigger('update_item_details');
- // },
- // update_item_details: function(frm){
- // if(frm.doc.item_details){
- // frm.doc.item_details.forEach(function(item){
- // frappe.model.set_value(item.doctype, item.name, 'has_stone', frm.doc.has_stone);
- // frappe.model.set_value(item.doctype, item.name, 'stone', frm.doc.stone);
- // });
- // }
- // frm.refresh_fields();
- // },
- // create_item: function(frm) {
- // if (frm.is_new()) {
- // create_item_details(frm);
- // frm.trigger('update_item_details_table');
- // }
- // },
- quantity: function(frm) {
- var quantity = frm.doc.quantity;
- var cur_items_len = frm.doc.item_details.length;
-
- if (quantity < cur_items_len) {
- frm.doc.item_details.splice(quantity);
- } else {
- for (var i = cur_items_len; i < quantity; i++) {
- let row = frm.add_child('item_details', {
- item_category: frm.doc.item_category,
- item_type: frm.doc.item_type,
- item_group: frm.doc.item_group,
- purity: frm.doc.purity,
- board_rate: frm.doc.board_rate
- });
- }
- }
+ quantity: function (frm) {
+ var quantity = frm.doc.quantity;
+ var cur_items_len = frm.doc.item_details.length;
- frm.refresh_field('item_details');
+ if (quantity < cur_items_len) {
+ frm.doc.item_details.splice(quantity);
+ } else {
+ for (var i = cur_items_len; i < quantity; i++) {
+ let row = frm.add_child("item_details", {
+ item_category: frm.doc.item_category,
+ item_type: frm.doc.item_type,
+ item_group: frm.doc.item_group,
+ purity: frm.doc.purity,
+ board_rate: frm.doc.board_rate,
+ });
+ }
}
+
+ frm.refresh_field("item_details");
+ },
});
frappe.ui.form.on("Jewellery Item Receipt", {
- form_render : function(frm, cdt, cdn) {
- let d = locals[cdt][cdn];
- if (d.has_stone) {
- let net_weight = d.gold_weight + d.stone_weight;
- frappe.model.set_value(cdt, cdn, 'net_weight', net_weight);
- }
- },
- stone_weight: function(frm, cdt, cdn){
- let d = locals[cdt][cdn];
- if (d.single_stone){
- let net_weight = d.gold_weight + d.stone_weight;
- frappe.model.set_value(cdt, cdn, 'net_weight', net_weight);
- let stone_charge = d.unit_stone_charge * d.stone_weight;
- frappe.model.set_value(cdt, cdn, 'stone_charge', stone_charge);
- }
- },
- making_charge : function(frm, cdt, cdn){
- if (d.making_charge) {
- let amount = d.amount_without_making_charge + d.making_charge
- frappe.model.set_value(cdt, cdn, 'amount', amount);
- }frm.fields_dict.item_details.grid.toggle_enable('has_stone', frm.doc.has_stone);frm.fields_dict.item_details.grid.toggle_enable('has_stone', frm.doc.has_stone);
- },
- gold_weight: function(frm, cdt, cdn) {
- let d = locals[cdt][cdn];
- if (! d.has_stone) {
- let net_weight = d.gold_weight;
- frappe.model.set_value(cdt, cdn, 'net_weight', net_weight);
- let amount_without_making_charge = (d.gold_weight * frm.doc.board_rate)
- frappe.model.set_value(cdt, cdn, 'amount_without_making_charge', amount_without_making_charge);
- }
- },
- making_chargein_percentage: function(frm, cdt, cdn) {
- let d = locals[cdt][cdn];
- if (d.amount_without_making_charge && d.making_chargein_percentage) {
- let making_charge = d.amount_without_making_charge * (d.making_chargein_percentage / 100);
- frappe.model.set_value(cdt, cdn, 'making_charge', making_charge);
- }
- },
- making_charge: function(frm, cdt, cdn) {
- let d = locals[cdt][cdn];
- if (d.making_charge) {
- let amount = d.amount_without_making_charge + d.making_charge
- frappe.model.set_value(cdt, cdn, 'amount', amount);
- }
- },
- stone_charge : function(frm, cdt, cdn){
- let d = locals[cdt][cdn];
- if (d.has_stone){
- let amount_without_making_charge = (d.gold_weight * frm.doc.board_rate) + d.stone_charge
- frappe.model.set_value(cdt, cdn, 'amount_without_making_charge', amount_without_making_charge);
- }
- },
- add_multi_stone: function(frm, cdt, cdn) {
- if (frm.is_new()) {
- create_multi_stone(frm, cdt, cdn);
- }
+ form_render: function (frm, cdt, cdn) {
+ let d = locals[cdt][cdn];
+ if (d.has_stone) {
+ let net_weight = d.gold_weight + d.stone_weight;
+ frappe.model.set_value(cdt, cdn, "net_weight", net_weight);
+ }
+ },
+ stone_weight: function (frm, cdt, cdn) {
+ let d = locals[cdt][cdn];
+ if (d.single_stone) {
+ let net_weight = d.gold_weight + d.stone_weight;
+ frappe.model.set_value(cdt, cdn, "net_weight", net_weight);
+ let stone_charge = d.unit_stone_charge * d.stone_weight;
+ frappe.model.set_value(cdt, cdn, "stone_charge", stone_charge);
+ }
+ },
+ making_charge: function (frm, cdt, cdn) {
+ if (d.making_charge) {
+ let amount = d.amount_without_making_charge + d.making_charge;
+ frappe.model.set_value(cdt, cdn, "amount", amount);
+ }
+ frm.fields_dict.item_details.grid.toggle_enable(
+ "has_stone",
+ frm.doc.has_stone
+ );
+ frm.fields_dict.item_details.grid.toggle_enable(
+ "has_stone",
+ frm.doc.has_stone
+ );
+ },
+ gold_weight: function (frm, cdt, cdn) {
+ let d = locals[cdt][cdn];
+ if (!d.has_stone) {
+ let net_weight = d.gold_weight;
+ frappe.model.set_value(cdt, cdn, "net_weight", net_weight);
+ let amount_without_making_charge = d.gold_weight * frm.doc.board_rate;
+ frappe.model.set_value(
+ cdt,
+ cdn,
+ "amount_without_making_charge",
+ amount_without_making_charge
+ );
}
+ if (d.amount_without_making_charge && d.making_chargein_percentage) {
+ let making_charge =
+ d.amount_without_making_charge * (d.making_chargein_percentage / 100);
+ frappe.model.set_value(cdt, cdn, "making_charge", making_charge);
+ }
+ },
+ making_chargein_percentage: function (frm, cdt, cdn) {
+ let d = locals[cdt][cdn];
+ if (d.amount_without_making_charge && d.making_chargein_percentage) {
+ let making_charge =
+ d.amount_without_making_charge * (d.making_chargein_percentage / 100);
+ frappe.model.set_value(cdt, cdn, "making_charge", making_charge);
+ }
+ },
+ making_charge: function (frm, cdt, cdn) {
+ let d = locals[cdt][cdn];
+ if (d.making_charge) {
+ let amount = d.amount_without_making_charge + d.making_charge;
+ frappe.model.set_value(cdt, cdn, "amount", amount);
+ }
+ },
+ stone_charge: function (frm, cdt, cdn) {
+ let d = locals[cdt][cdn];
+ if (d.has_stone) {
+ let amount_without_making_charge =
+ d.gold_weight * frm.doc.board_rate + d.stone_charge;
+ frappe.model.set_value(
+ cdt,
+ cdn,
+ "amount_without_making_charge",
+ amount_without_making_charge
+ );
+ }
+ frm.refresh_field("item_details");
+ },
+ add_stone: function (frm, cdt, cdn) {
+ let row = locals[cdt][cdn];
+ if (frm.is_new()) {
+ frm.add_child("item_wise_stone_details", {
+ reference: row.idx,
+ stone: row.stone,
+ uom: row.stone_uom,
+ stone_weight: row.stone_weight,
+ rate: row.rate,
+ amount: row.rate * row.stone_weight,
+ });
+
+ if (row.stone_weight_gold_weight_uom)
+ row.stone_weight_gold_weight_uom += row.stone_weight;
+ else row.stone_weight_gold_weight_uom = row.stone_weight;
+ row.net_weight += row.stone_weight;
+ if (row.stone_charge) row.stone_charge += row.rate * row.stone_weight;
+ else row.stone_charge = row.rate * row.stone_weight;
+ }
+
+ row.stone = "";
+ row.stone_uom = "";
+ row.stone_weight = "";
+ row.rate = "";
+
+ frm.refresh_field("item_wise_stone_details");
+ frm.refresh_field("item_details");
+ },
});
-let create_multi_stone = function(frm, cdt, cdn) {
+let create_multi_stone = function (frm, cdt, cdn) {
let d = new frappe.ui.Dialog({
- title: 'Enter Stone Details',
+ title: "Enter Stone Details",
fields: [
{
- label: 'UOM',
- fieldname: 'uom',
- fieldtype: 'Link',
- options: 'UOM',
- reqd: 1
+ label: "UOM",
+ fieldname: "uom",
+ fieldtype: "Link",
+ options: "UOM",
+ reqd: 1,
},
{
- label: 'Gold Weight',
- fieldname: 'gold_weight',
- fieldtype: 'Float',
+ label: "Gold Weight",
+ fieldname: "gold_weight",
+ fieldtype: "Float",
reqd: 1,
},
{
- label: 'Making Charge In Percentage',
- fieldname: 'making_charge_in_percentage',
- fieldtype: 'Percent',
- reqd: 1
+ label: "Making Charge In Percentage",
+ fieldname: "making_charge_in_percentage",
+ fieldtype: "Percent",
+ reqd: 1,
},
{
- label: 'Stone Details',
- fieldname: 'stone_details',
- fieldtype: 'Table',
+ label: "Stone Details",
+ fieldname: "stone_details",
+ fieldtype: "Table",
reqd: 1,
annotatable: true,
editable: true,
fields: [
{
- label: 'Stone',
- fieldname: 'stone',
- fieldtype: 'Link',
+ label: "Stone",
+ fieldname: "stone",
+ fieldtype: "Link",
in_list_view: 1,
- options: 'AuMMS Item'
+ options: "AuMMS Item",
},
{
- label: 'Stone Weight',
- fieldname: 'stone_weight',
- fieldtype: 'Float',
- in_list_view: 1
- }
- ]
+ label: "Stone Weight",
+ fieldname: "stone_weight",
+ fieldtype: "Float",
+ in_list_view: 1,
+ },
+ ],
},
{
- label: 'Total Stone Weight',
- fieldname: 'total_stone_weight',
- fieldtype: 'Float',
+ label: "Total Stone Weight",
+ fieldname: "total_stone_weight",
+ fieldtype: "Float",
},
{
- label: 'Unit of Stone Charge',
- fieldname: 'unit_stone_charge',
- fieldtype: 'Int',
- reqd: 1
+ label: "Unit of Stone Charge",
+ fieldname: "unit_stone_charge",
+ fieldtype: "Int",
+ reqd: 1,
},
],
- primary_action_label: 'Submit',
- primary_action: function(values) {
+ primary_action_label: "Submit",
+ primary_action: function (values) {
var quantity = frm.doc.quantity;
for (var i = 0; i < quantity; i++) {
- var child = locals[cdt][cdn]
+ var child = locals[cdt][cdn];
if (!child) {
// If the child at index 'i' doesn't exist, add a new row
- child = frm.add_child('item_details', {
+ child = frm.add_child("item_details", {
item_category: frm.doc.item_category,
item_type: frm.doc.item_type,
item_group: frm.doc.item_group,
purity: frm.doc.purity,
- board_rate: frm.doc.board_rate
+ board_rate: frm.doc.board_rate,
});
}
// Update the corresponding fields for the current child row
@@ -253,56 +316,70 @@ let create_multi_stone = function(frm, cdt, cdn) {
let stone_charge = values.unit_stone_charge * values.total_stone_weight;
child.stone_charge = stone_charge;
- let amount_without_making_charge = (values.gold_weight * frm.doc.board_rate) + stone_charge;
+ let amount_without_making_charge =
+ values.gold_weight * frm.doc.board_rate + stone_charge;
child.amount_without_making_charge = amount_without_making_charge;
- let making_charge = amount_without_making_charge * (values.making_charge_in_percentage / 100);
+ let making_charge =
+ amount_without_making_charge *
+ (values.making_charge_in_percentage / 100);
child.making_charge = making_charge;
let amount = amount_without_making_charge + making_charge;
- child.amount = amount;
-
+ child.amount = amount;
}
- refresh_field('item_details');
+ refresh_field("item_details");
d.hide();
- }
+ },
});
function calculate_total_stone_weight() {
let total_weight = 0;
- let stone_details = d.get_value('stone_details');
+ let stone_details = d.get_value("stone_details");
if (stone_details && stone_details.length > 0) {
- stone_details.forEach(function(row) {
+ stone_details.forEach(function (row) {
total_weight += row.stone_weight || 0;
});
}
- d.set_value('total_stone_weight', total_weight);
+ d.set_value("total_stone_weight", total_weight);
}
- document.addEventListener('change', function(event) {
+ document.addEventListener("change", function (event) {
if (event.target.matches('[data-fieldname="stone_weight"]')) {
calculate_total_stone_weight();
}
});
- if ('stone_details' in d.fields_dict) {
- d.fields_dict.stone_details.grid.get_field('stone').get_query = function() {
+ if ("stone_details" in d.fields_dict) {
+ d.fields_dict.stone_details.grid.get_field("stone").get_query =
+ function () {
return {
- filters: {
- "is_stone_item": 1
- }
+ filters: {
+ is_stone_item: 1,
+ },
};
- };
- };
- if ('uom' in d.fields_dict) {
- d.fields_dict.uom.get_query = function() {
+ };
+ }
+ if ("uom" in d.fields_dict) {
+ d.fields_dict.uom.get_query = function () {
return {
filters: {
- "is_purity_uom": 1
- }
- }
- }
+ is_purity_uom: 1,
+ },
+ };
+ };
}
d.show();
};
+
+function item_group_filters(frm) {
+ frm.set_query("item_group", () => {
+ return {
+ filters: {
+ is_aumms_item_group: 1,
+ item_type: frm.doc.item_type,
+ },
+ };
+ });
+}
diff --git a/aumms/aumms/doctype/jewellery_receipt/jewellery_receipt.json b/aumms/aumms/doctype/jewellery_receipt/jewellery_receipt.json
index 99fccf26..d019ef00 100644
--- a/aumms/aumms/doctype/jewellery_receipt/jewellery_receipt.json
+++ b/aumms/aumms/doctype/jewellery_receipt/jewellery_receipt.json
@@ -19,6 +19,7 @@
"quantity",
"section_break_vxux",
"item_details",
+ "item_wise_stone_details",
"amended_from"
],
"fields": [
@@ -66,8 +67,8 @@
"fieldtype": "Float",
"in_list_view": 1,
"label": "Board Rate",
- "precision": "2",
- "reqd": 1
+ "mandatory_depends_on": "eval: doc.is_fix",
+ "precision": "2"
},
{
"default": "Today",
@@ -105,7 +106,7 @@
"reqd": 1
},
{
- "default": "0",
+ "default": "1",
"fieldname": "is_fix",
"fieldtype": "Check",
"label": "Fixed Charge"
@@ -114,12 +115,19 @@
"fieldname": "quantity",
"fieldtype": "Int",
"label": "Quantity"
+ },
+ {
+ "fieldname": "item_wise_stone_details",
+ "fieldtype": "Table",
+ "label": "Item Wise Stone Details",
+ "options": "Item Wise Stone Details",
+ "read_only": 1
}
],
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
- "modified": "2024-03-19 12:52:08.855007",
+ "modified": "2024-08-20 10:13:09.368757",
"modified_by": "Administrator",
"module": "AuMMS",
"name": "Jewellery Receipt",
diff --git a/aumms/aumms/doctype/jewellery_receipt/jewellery_receipt.py b/aumms/aumms/doctype/jewellery_receipt/jewellery_receipt.py
index f03b84f0..5c4d7b80 100644
--- a/aumms/aumms/doctype/jewellery_receipt/jewellery_receipt.py
+++ b/aumms/aumms/doctype/jewellery_receipt/jewellery_receipt.py
@@ -1,139 +1,106 @@
-# Copyright (c) 2024, efeone and contributors
-# For license information, please see license.txt
import frappe
-from frappe.model import meta
-from frappe.utils import today
from frappe.model.document import Document
-from frappe.model.naming import make_autoname
-from frappe.model.mapper import get_mapped_doc
class JewelleryReceipt(Document):
- def autoname(self):
- """
- Set the autoname for the document based on the specified format.
- """
- for item_detail in self.get("item_details"):
- item_code_parts = [self.item_category, str(item_detail.gold_weight)]
-
- if item_detail.has_stone:
- if item_detail.single_stone:
- item_code_parts.extend([item_detail.stone, str(item_detail.stone_weight)])
- elif item_detail.multi_stone:
- stones = item_detail.stones.split(',') if item_detail.stones else []
- for stone in stones:
- item_code_parts.append(stone)
-
- item_detail.item_code = ' '.join(item_code_parts)
-
- def validate(self):
- self.validate_date()
-
- def on_submit(self):
- self.create_item()
- self.create_purchase_receipt()
- self.make_form_read_only(['aumms_item', 'purchase_receipt', 'metal_ledger'])
-
- def validate_date(self):
- self.calculate_item_details()
-
- def make_form_read_only(self, fields):
- for field in fields:
- self.set(field, 'read_only', 1)
-
-
- def create_item(self):
- for item_detail in self.get("item_details"):
- aumms_item = frappe.new_doc('AuMMS Item')
- aumms_item.item_code = item_detail.item_code
- aumms_item.item_name = item_detail.item_code
- aumms_item.purity = self.purity
- aumms_item.item_group = self.item_group
- aumms_item.item_type = self.item_type
- aumms_item.weight_per_unit = item_detail.net_weight
- aumms_item.weight_uom = item_detail.uom
- aumms_item.has_stone = item_detail.has_stone
- aumms_item.gold_weight = item_detail.gold_weight
- aumms_item.item_category = item_detail.item_category
-
- if item_detail.has_stone:
- if item_detail.single_stone:
- aumms_item.append('stone_details', {
- 'stone_weight': item_detail.stone_weight,
- 'stone_charge': item_detail.stone_charge,
- 'item_name': item_detail.stone,
- 'stone_type': item_detail.stone,
- })
- else:
- stones = item_detail.stones.split(',') if item_detail.stones else []
- individual_stone_weight = item_detail.individual_stone_weight
- if individual_stone_weight:
- stone_weight = individual_stone_weight.split(',')
- for stone, weight in zip(stones, stone_weight):
- aumms_item.append('stone_details', {
- 'stone_weight': float(weight),
- 'stone_charge': item_detail.unit_stone_charge * float(weight),
- 'item_name': stone,
- 'stone_type': stone,
- })
-
- aumms_item.insert(ignore_permissions=True)
- frappe.msgprint('AuMMS Item Created.', indicator="green", alert=1)
- created_item_code = aumms_item.item_code
-
-
- def create_purchase_receipt(self):
- # Create a new Purchase Receipt
- purchase_receipt = frappe.new_doc('Purchase Receipt')
- purchase_receipt.supplier = self.supplier
- # purchase_receipt.total_qty = self.quantity
- purchase_receipt.keep_metal_ledger = 1
-
- for item_detail in self.get("item_details"):
- purchase_receipt.append('items', {
- 'item_code': item_detail.item_code,
- 'item_name': item_detail.item_code,
- 'board_rate': self.board_rate,
- 'qty': item_detail.gold_weight,
- 'uom': item_detail.uom,
- 'stock_uom': item_detail.uom,
- 'conversion_factor': 1,
- 'base_rate': self.board_rate,
- 'rate': item_detail.amount / item_detail.gold_weight,
- 'custom_making_charge': item_detail.making_charge,
- 'custom_stone_weight': item_detail.stone_weight,
- 'custom_stone_charge': item_detail.stone_charge,
-
- })
- purchase_receipt.insert(ignore_permissions=True)
- purchase_receipt.submit()
- frappe.msgprint('Purchase Receipt created.', indicator="green", alert=1)
-
- # except frappe.DuplicateEntryError as e:
- # # Handle duplicate entry error
- # frappe.msgprint(f'Duplicate entry error: {e}', indicator="red", alert=1)
- # except Exception as ex:
- # # Handle other exceptions
- # frappe.msgprint(f'Error: {ex}', indicator="red", alert=1)
-
- def calculate_item_details(self):
- for item_detail in self.get("item_details"):
- if item_detail.single_stone:
- if item_detail.stone_weight:
- item_detail.net_weight = item_detail.gold_weight + item_detail.stone_weight
- if item_detail.unit_stone_charge:
- item_detail.stone_charge = item_detail.unit_stone_charge * item_detail.stone_weight
- else:
- item_detail.net_weight = item_detail.gold_weight
- if self.board_rate:
- if item_detail.has_stone:
- item_detail.amount_without_making_charge = (item_detail.gold_weight * self.board_rate) + item_detail.stone_charge
- else:
- item_detail.amount_without_making_charge = item_detail.gold_weight * self.board_rate
-
- if item_detail.amount_without_making_charge:
- item_detail.making_charge = item_detail.amount_without_making_charge * (item_detail.making_chargein_percentage / 100)
-
- if item_detail.making_charge:
- item_detail.amount = item_detail.amount_without_making_charge + item_detail.making_charge
- frappe.db.commit()
+ def autoname(self):
+ """
+ Set the autoname for the document based on the specified format.
+ """
+ for item_detail in self.get("item_details"):
+ item_code_parts = [self.item_category, str(item_detail.gold_weight)]
+
+ if item_detail.has_stone:
+ for stone in self.item_wise_stone_details:
+ if stone.reference == item_detail.idx:
+ item_code_parts.append(stone.stone)
+
+ item_detail.item_code = ' '.join(item_code_parts)
+
+ def validate(self):
+ self.validate_date()
+
+ def on_submit(self):
+ self.create_item()
+ self.create_purchase_receipt()
+ self.make_form_read_only(['aumms_item', 'purchase_receipt', 'metal_ledger'])
+
+ def validate_date(self):
+ self.calculate_item_details()
+
+ def make_form_read_only(self, fields):
+ for field in fields:
+ self.set(field, 'read_only', 1)
+
+ def create_item(self):
+ for item_detail in self.get("item_details"):
+ aumms_item = frappe.new_doc('AuMMS Item')
+ aumms_item.item_code = item_detail.item_code
+ aumms_item.item_name = item_detail.item_code
+ aumms_item.purity = self.purity
+ aumms_item.item_group = self.item_group
+ aumms_item.item_type = self.item_type
+ aumms_item.weight_per_unit = item_detail.net_weight
+ aumms_item.weight_uom = item_detail.uom
+ aumms_item.has_stone = item_detail.has_stone
+ aumms_item.gold_weight = item_detail.gold_weight
+ aumms_item.item_category = item_detail.item_category
+ aumms_item.is_purchase_item = 1
+ aumms_item.is_sales_item = 1 if item_detail.is_sales_item else 0
+
+ if item_detail.hallmarked:
+ aumms_item.hallmarked = 1
+ aumms_item.huid = item_detail.huid
+
+ # Add only the relevant stone details based on the reference
+ if item_detail.has_stone:
+ for stone in self.item_wise_stone_details:
+ if stone.reference == item_detail.idx:
+ aumms_item.append("stone_details", {
+ "stone_weight": stone.stone_weight,
+ "stone_charge": stone.rate * stone.stone_weight,
+ "item_name": stone.stone,
+ "stone_type": stone.stone
+ })
+
+ aumms_item.insert(ignore_permissions=True)
+ frappe.msgprint('AuMMS Item Created.', indicator="green", alert=1)
+
+ def create_purchase_receipt(self):
+ purchase_receipt = frappe.new_doc('Purchase Receipt')
+ purchase_receipt.supplier = self.supplier
+ purchase_receipt.keep_metal_ledger = 1
+
+ for item_detail in self.get("item_details"):
+ purchase_receipt.append('items', {
+ 'item_code': item_detail.item_code,
+ 'item_name': item_detail.item_code,
+ 'board_rate': self.board_rate or 0,
+ 'qty': 1,
+ 'uom': "Nos",
+ "weight_per_unit": item_detail.gold_weight,
+ "weight_uom": item_detail.uom,
+ 'base_rate': item_detail.amount,
+ 'rate': item_detail.amount,
+ 'making_charge': item_detail.making_charge or 0,
+ 'stone_weight': item_detail.stone_weight or 0,
+ 'stone_charge': item_detail.stone_charge or 0,
+ })
+ purchase_receipt.insert(ignore_permissions=True)
+ purchase_receipt.submit()
+ frappe.msgprint('Purchase Receipt created.', indicator="green", alert=1)
+
+ def calculate_item_details(self):
+ for item_detail in self.get("item_details"):
+ board_rate = self.board_rate or 0
+ stone_charge = item_detail.stone_charge or 0
+ gold_weight = item_detail.gold_weight or 0
+ making_chargein_percentage = item_detail.making_chargein_percentage or 0
+
+ if item_detail.has_stone:
+ item_detail.amount_without_making_charge = (gold_weight * board_rate) + stone_charge
+ else:
+ item_detail.amount_without_making_charge = gold_weight * board_rate
+
+ item_detail.making_charge = item_detail.amount_without_making_charge * (making_chargein_percentage / 100)
+ item_detail.amount = item_detail.amount_without_making_charge + item_detail.making_charge
diff --git a/aumms/aumms/report/metal_ledger/metal_ledger.py b/aumms/aumms/report/metal_ledger/metal_ledger.py
index 3d4e5c09..a7a0e39f 100644
--- a/aumms/aumms/report/metal_ledger/metal_ledger.py
+++ b/aumms/aumms/report/metal_ledger/metal_ledger.py
@@ -2,52 +2,124 @@
# For license information, please see license.txt
from __future__ import unicode_literals
+
import frappe
-from frappe.utils import *
from frappe import _
-from aumms.aumms.utils import get_party_link_if_exist, get_conversion_factor
+from frappe.utils.data import get_datetime, getdate
+
+from aumms.aumms.utils import get_conversion_factor, get_party_link_if_exist
+
def execute(filters=None):
columns, data = get_columns(filters), get_data(filters)
- return columns, data
+ report_summary = get_report_summary(filters)
+ return columns, data, None, None, report_summary
+
def get_columns(filters):
- ''' Method to get columns in report '''
+ """Method to get columns in report"""
columns = [
- {'label': _('Posting Date'), 'fieldtype': 'Date', 'width': 110},
- {'label': _('Item Code'), 'fieldtype': 'Link', 'options': 'Item', 'width': 110},
- {'label': _('Party Type'), 'fieldname': 'party_type', 'fieldtype': 'Link', 'options': 'DocType'},
- {'label': _('Party'), 'fieldtype': 'Dynamic Link', 'options': 'party_type', 'width': 130},
- {'label': _('Item Type'), 'fieldtype': 'Link', 'options': 'Item Type', 'width': 100},
- {'label': _('Purity'), 'fieldtype': 'Link', 'options': 'Purity', 'width': 75},
- {'label': _('Stock UOM'), 'fieldtype': 'Link', 'options': 'UOM', 'width': 100},
- {'label': _('In Quantity'), 'fieldname': 'in_qty', 'fieldtype': 'Float', 'width': 100},
- {'label': _('Out Quantity'), 'fieldname': 'out_qty', 'fieldtype': 'Float', 'width': 120},
- {'label': _('Voucher Type'), 'fieldtype': 'Link', 'options': 'DocType', 'fieldname': 'voucher_type', 'hidden': 1},
- {'label': _('Voucher No'), 'fieldtype': 'Dynamic Link', 'options': 'voucher_type', 'width': 200},
- {'label': _('Incoming Rate'), 'fieldname': 'in_rate', 'fieldtype': 'Currency', 'width': 120},
- {'label': _('Outgoing Rate'), 'fieldname': 'out_rate', 'fieldtype': 'Currency', 'width': 120},
- {'label': _('Amount'), 'fieldname': 'amount', 'fieldtype': 'Currency', 'width': 110},
- {'label': _('Posting Time'), 'fieldtype': 'Time', 'width': 110},
- ]
+ {"label": _("Posting Date"), "fieldtype": "Date", "width": 110},
+ {"label": _("Item Code"), "fieldtype": "Link", "options": "Item", "width": 110},
+ {
+ "label": _("Party Type"),
+ "fieldname": "party_type",
+ "fieldtype": "Link",
+ "options": "DocType",
+ },
+ {
+ "label": _("Party"),
+ "fieldtype": "Dynamic Link",
+ "options": "party_type",
+ "width": 130,
+ },
+ {
+ "label": _("Item Type"),
+ "fieldtype": "Link",
+ "options": "Item Type",
+ "width": 100,
+ },
+ {
+ "label": _("Purity of Transaction"),
+ "fieldtype": "Link",
+ "options": "Purity",
+ "width": 175,
+ },
+ {"label": _("Weight UOM"), "fieldtype": "Link", "options": "UOM", "width": 100},
+ {
+ "label": _("In Quantity"),
+ "fieldname": "in_qty",
+ "fieldtype": "Float",
+ "width": 100,
+ },
+ {
+ "label": _("Out Quantity"),
+ "fieldname": "out_qty",
+ "fieldtype": "Float",
+ "width": 120,
+ },
+ {
+ "label": _("Voucher Type"),
+ "fieldtype": "Link",
+ "options": "DocType",
+ "fieldname": "voucher_type",
+ "hidden": 1,
+ },
+ {
+ "label": _("Voucher No"),
+ "fieldtype": "Dynamic Link",
+ "options": "voucher_type",
+ "width": 200,
+ },
+ {
+ "label": _("Incoming Rate"),
+ "fieldname": "in_rate",
+ "fieldtype": "Currency",
+ "width": 120,
+ },
+ {
+ "label": _("Outgoing Rate"),
+ "fieldname": "out_rate",
+ "fieldtype": "Currency",
+ "width": 120,
+ },
+ {
+ "label": _("Amount"),
+ "fieldname": "amount",
+ "fieldtype": "Currency",
+ "width": 110,
+ },
+ {"label": _("Posting Time"), "fieldtype": "Time", "width": 110},
+ ]
if filters.purity and filters.uom:
- columns.insert(9, {'label': _('Balance Quantity'), 'fieldname': 'balance_qty', 'fieldtype': 'Float', 'width': 150})
+ columns.insert(
+ 9,
+ {
+ "label": _("Balance Quantity"),
+ "fieldname": "balance_qty",
+ "fieldtype": "Float",
+ "width": 150,
+ },
+ )
return columns
+
def get_data(filters):
- ''' Method to get data '''
+ """Method to get data"""
get_filters(filters)
data = []
- metal_ledger_entry_list = frappe.get_all('Metal Ledger Entry', order_by='creation desc', filters=get_filters(filters))
+ metal_ledger_entry_list = frappe.get_all(
+ "Metal Ledger Entry", order_by="creation desc", filters=get_filters(filters)
+ )
for metal_ledger_entry in metal_ledger_entry_list:
- doc = frappe.get_doc('Metal Ledger Entry', metal_ledger_entry.name)
+ doc = frappe.get_doc("Metal Ledger Entry", metal_ledger_entry.name)
row = [
doc.posting_date,
doc.item_code,
doc.party_type,
doc.party,
doc.item_type,
- doc.purity,
+ doc.purity or "22k", # CHANGE THIS!
doc.stock_uom,
doc.in_qty,
doc.out_qty,
@@ -56,27 +128,37 @@ def get_data(filters):
doc.incoming_rate,
doc.outgoing_rate,
doc.amount,
- doc.posting_time
+ doc.posting_time,
]
+ if filters.purity:
+ row[7], row[8] = get_purity_converted_qty(
+ doc.purity, doc.in_qty, doc.out_qty, filters.purity
+ )
if filters.purity and filters.uom:
- balance_qty = get_balance_qty(doc.creation, doc.item_type, doc.party_link, filters.purity, filters.uom)
+ balance_qty = get_balance_qty(
+ doc.creation, filters.purity, filters.uom, doc.item_type, doc.party_link
+ )
row.insert(9, balance_qty)
data.append(row)
return data
+
def get_filters(filters):
- ''' Method to get filters '''
+ """Method to get filters"""
conditions = {}
if filters.company:
- conditions['company'] = filters.company
+ conditions["company"] = filters.company
if filters.from_date and filters.to_date:
- conditions['posting_date'] = [ 'between' , [ getdate(filters.from_date), getdate(filters.to_date) ] ]
+ conditions["posting_date"] = [
+ "between",
+ [getdate(filters.from_date), getdate(filters.to_date)],
+ ]
if filters.item_code:
- conditions['item_code'] = filters.item_code
+ conditions["item_code"] = filters.item_code
if filters.item_type:
- conditions['item_type'] = filters.item_type
+ conditions["item_type"] = filters.item_type
if filters.party_type and not filters.party:
- conditions['party_type'] = filters.party_type
+ conditions["party_type"] = filters.party_type
if filters.party:
# to show common party accounts
@@ -84,49 +166,60 @@ def get_filters(filters):
# get party link of this party
party_link = get_party_link_if_exist(filters.party_type, filters.party)
- conditions['party_link'] = party_link
+ conditions["party_link"] = party_link
else:
# update condition with party
- conditions['party'] = filters.party
+ conditions["party"] = filters.party
if filters.voucher_type:
- conditions['voucher_type'] = filters.voucher_type
+ conditions["voucher_type"] = filters.voucher_type
if filters.voucher_no:
- conditions['voucher_no'] = filters.voucher_no
+ conditions["voucher_no"] = filters.voucher_no
if filters.item_type:
- conditions['item_type'] = filters.item_type
+ conditions["item_type"] = filters.item_type
if conditions:
return conditions
else:
return []
-def get_balance_qty(creation, item_type, party_link, purity, uom):
+
+def get_balance_qty(
+ creation, purity, uom, item_type=None, party_link=None, from_datetime=None
+):
"""
- method to get balance qty of a an item type of a
- common account party with conversion of purity and uom
- args:
- creation: creation datetime of ledger document
- item_type: item type link
- party_link: name of party link
- purity: purity set in the filter
- uom: uom set in the filter
- output: balance qty of an item type of a common account party in filter uom and purity
+ method to get balance qty of a an item type of a
+ common account party with conversion of purity and uom
+ args:
+ creation: creation datetime of ledger document
+ item_type: item type link
+ party_link: name of party link
+ purity: purity set in the filter
+ uom: uom set in the filter
+ output: balance qty of an item type of a common account party in filter uom and purity
"""
- ledgers = frappe.db.get_all('Metal Ledger Entry',
- filters = {
- 'creation': ['<=', creation],
- 'item_type': item_type,
- 'party_link': party_link,
- 'is_cancelled': 0
- },
- fields = [
- 'in_qty', 'out_qty', 'stock_uom', 'purity_percentage', 'purity'
+ filters_dict = {
+ "creation": ["<=", get_datetime(creation)],
+ "is_cancelled": 0,
+ }
+ if from_datetime:
+ filters_dict["creation"] = [
+ "between",
+ [get_datetime(from_datetime), get_datetime(creation)],
]
+ if item_type:
+ filters_dict["item_type"] = item_type
+ if party_link:
+ filters_dict["party"] = party_link
+ print("\n", filters_dict, "\n")
+ ledgers = frappe.db.get_all(
+ "Metal Ledger Entry",
+ filters=filters_dict,
+ fields=["in_qty", "out_qty", "stock_uom", "purity_percentage", "purity"],
)
balance = 0
- purity_percentage = frappe.db.get_value('Purity', purity, 'purity_percentage')
+ purity_percentage = frappe.db.get_value("Purity", purity, "purity_percentage")
for ledger in ledgers:
qty = ledger.in_qty if ledger.in_qty else -ledger.out_qty
@@ -136,18 +229,81 @@ def get_balance_qty(creation, item_type, party_link, purity, uom):
balance += qty
else:
# convert purity
- purity_converted_qty = (qty * float(ledger.purity_percentage))/float(purity_percentage)
+ purity_converted_qty = (qty * float(ledger.purity_percentage)) / float(
+ purity_percentage
+ )
balance += purity_converted_qty
else:
# update qty with conversion factor
conversion_factor = get_conversion_factor(ledger.stock_uom, uom)
if not conversion_factor:
- frappe.throw(_('Please set Conversion Factor for {0} to {1}'.format(ledger.stock_uom, uom)))
+ frappe.throw(
+ _(
+ "Please set Conversion Factor for {0} to {1}".format(
+ ledger.stock_uom, uom
+ )
+ )
+ )
qty *= conversion_factor
if ledger.purity == purity:
balance += qty
else:
# convert purity
- purity_converted_qty = (qty * float(ledger.purity_percentage))/float(purity_percentage)
+ purity_converted_qty = (qty * float(ledger.purity_percentage)) / float(
+ purity_percentage
+ )
balance += purity_converted_qty
return balance
+
+
+def get_purity_converted_qty(ledger_purity, in_qty, out_qty, filter_purity):
+ if ledger_purity == filter_purity:
+ return in_qty, out_qty
+ ledger_purity_percentage = frappe.db.get_value(
+ "Purity", ledger_purity, "purity_percentage"
+ )
+ filter_purity_percentage = frappe.db.get_value(
+ "Purity", filter_purity, "purity_percentage"
+ )
+ purity_converted_in_qty = 0
+ if not ledger_purity_percentage:
+ ledger_purity_percentage = 91.67 # CHANGE THIS!
+ if in_qty:
+ purity_converted_in_qty = (
+ in_qty * ledger_purity_percentage
+ ) / filter_purity_percentage
+ purity_converted_out_qty = (
+ out_qty * ledger_purity_percentage
+ ) / filter_purity_percentage
+ return purity_converted_in_qty, purity_converted_out_qty
+
+
+def get_report_summary(filters):
+ """Generates Report Summary object
+
+ Args:
+ filters (frappe dict): contains filters selected in the report
+
+ Returns:
+ list of dict: each dict containing the details of summary to be displayed
+ """
+ report_summary = []
+
+ opening_balance = get_balance_qty(
+ filters.to_date,
+ filters.purity if filters.purity else "22k",
+ filters.uom if filters.uom else "Gram",
+ None,
+ filters.party,
+ filters.from_date,
+ )
+
+ report_summary.append(
+ {
+ "value": opening_balance,
+ "indicator": "Green" if opening_balance > 0 else "Red",
+ "label": _("Opening Balance"),
+ "datatype": "Float",
+ }
+ )
+ return report_summary
diff --git a/aumms/aumms/utils.py b/aumms/aumms/utils.py
index 23babf69..a53714e6 100644
--- a/aumms/aumms/utils.py
+++ b/aumms/aumms/utils.py
@@ -1,6 +1,7 @@
import frappe
from frappe.utils import *
from frappe import _
+from frappe.utils import getdate
@frappe.whitelist()
def get_board_rate(item_type, purity, stock_uom, date, time=None):
@@ -12,14 +13,19 @@ def get_board_rate(item_type, purity, stock_uom, date, time=None):
else:
filters = { 'docstatus': '1', 'item_type': item_type, 'purity': purity, 'date': getdate(date) }
+ print(filters)
+
if frappe.db.exists('Board Rate', filters):
# get board rate and board rate uom (bruom)
board_rate, bruom = frappe.db.get_value('Board Rate', filters, ['board_rate', 'uom'])
+ print("as", board_rate, bruom)
# return board rate if board rate uom is same as stock uom
if bruom == stock_uom:
return board_rate
# else multiply the board rate with conversion factor
else:
+ if stock_uom == "Nos" or bruom == 'Gram' or bruom == 'Nos':
+ return board_rate
# get conversion factor value using stock_uom as from_uom and bruom as to_uom
conversion_factor = get_conversion_factor(stock_uom, bruom)
if conversion_factor:
@@ -68,7 +74,7 @@ def create_metal_ledger_entries(doc, method=None):
'voucher_type': doc.doctype,
'voucher_no': doc.name,
'company': company,
- 'party_link': doc.party_link
+ # 'party_link': doc.party_link
}
# set party type and party in fields if doctype is Purchase Receipt
@@ -86,30 +92,32 @@ def create_metal_ledger_entries(doc, method=None):
# declare ledger_created as false
ledger_created = 0
for item in doc.items:
+
+ aumms_item_doc = frappe.get_doc("AuMMS Item", item.item_code)
# set item details in fields
fields['item_code'] = item.item_code
fields['item_name'] = item.item_name
- fields['stock_uom'] = item.stock_uom
- fields['purity'] = item.purity
- fields['purity_percentage'] = item.purity_percentage
- fields['board_rate'] = item.rate
+ fields['stock_uom'] = item.weight_uom
+ fields['purity'] = aumms_item_doc.purity
+ fields['purity_percentage'] = aumms_item_doc.purity_percentage
+ fields['board_rate'] = item.board_rate
fields['batch_no'] = item.batch_no
- fields['item_type'] = item.item_type
+ fields['item_type'] = aumms_item_doc.item_type
# get balance qty of the item for this party
filters = {
- 'item_type': item.item_type,
- 'purity': item.purity,
- 'stock_uom': item.stock_uom,
- 'party_link': doc.party_link,
+ 'item_type': aumms_item_doc.item_type,
+ 'purity': aumms_item_doc.purity,
+ 'stock_uom': item.weight_uom,
+ # 'party_link': doc.party_link,
'is_cancelled': 0
}
balance_qty = frappe.db.get_value('Metal Ledger Entry', filters, 'balance_qty')
if doc.doctype == 'Purchase Receipt':
# update balance_qty
- balance_qty = balance_qty+item.stock_qty if balance_qty else item.stock_qty
- fields['in_qty'] = item.stock_qty
+ balance_qty = balance_qty+item.total_weight if balance_qty else item.total_weight
+ fields['in_qty'] = item.total_weight
fields['outgoing_rate'] = item.rate
fields['balance_qty'] = balance_qty
fields['amount'] = -item.amount
diff --git a/aumms/aumms/workspace/aumms/aumms.json b/aumms/aumms/workspace/aumms/aumms.json
index 860c3364..32bedde8 100644
--- a/aumms/aumms/workspace/aumms/aumms.json
+++ b/aumms/aumms/workspace/aumms/aumms.json
@@ -5,7 +5,7 @@
"label": "Last Month Board Rate"
}
],
- "content": "[{\"id\":\"xytMzcNTlF\",\"type\":\"header\",\"data\":{\"text\":\"AuMMS\",\"col\":12}},{\"id\":\"jB5UHMdjpr\",\"type\":\"chart\",\"data\":{\"chart_name\":\"Last Month Board Rate\",\"col\":12}},{\"id\":\"gi-NMLZp61\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Board Rate\",\"col\":3}},{\"id\":\"UlF0vIuW_h\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"AuMMS Item\",\"col\":3}},{\"id\":\"hYF_ghyeVA\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"AuMMS Item Group\",\"col\":3}},{\"id\":\"UWuMllqZ2H\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Purity Conversion Tool\",\"col\":3}},{\"id\":\"aAr2ThZ43S\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Jewellery Invoice\",\"col\":3}},{\"id\":\"RvEzssIYXw\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Design Request\",\"col\":3}},{\"id\":\"wGYHyDla9N\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Design Analysis\",\"col\":3}},{\"id\":\"_LyZYOL-nL\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Bill of Materials\",\"col\":3}},{\"id\":\"5uZY95JpYz\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Work Order\",\"col\":3}},{\"id\":\"HvqBLZ1Lor\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Job Card\",\"col\":3}},{\"id\":\"9w8SYT0U69\",\"type\":\"spacer\",\"data\":{\"col\":12}},{\"id\":\"7bvu06zTCN\",\"type\":\"paragraph\",\"data\":{\"text\":\"AuMMS Manufacturing\",\"col\":12}},{\"id\":\"9t9kxybNJK\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Customer Jewellery Order\",\"col\":3}},{\"id\":\"06TYM1ppyy\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Jewellery Order\",\"col\":3}},{\"id\":\"O0JGHNHtrF\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Manufacturing Request\",\"col\":3}},{\"id\":\"2s8KvBILCm\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Raw Material Request\",\"col\":3}},{\"id\":\"MNE7fNKcwd\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Raw Material Bundle\",\"col\":3}},{\"id\":\"hEIbTGUk-V\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Jewellery Job Card\",\"col\":3}},{\"id\":\"cT93WyR0mJ\",\"type\":\"header\",\"data\":{\"text\":\"Reports & Masters\",\"col\":12}},{\"id\":\"HkzazEK-HJ\",\"type\":\"card\",\"data\":{\"card_name\":\"Masters\",\"col\":4}},{\"id\":\"6hfzWxhLly\",\"type\":\"card\",\"data\":{\"card_name\":\"Settings\",\"col\":4}},{\"id\":\"GnDPsk1c5H\",\"type\":\"card\",\"data\":{\"card_name\":\"Reports\",\"col\":4}}]",
+ "content": "[{\"id\":\"xytMzcNTlF\",\"type\":\"header\",\"data\":{\"text\":\"AuMMS\",\"col\":12}},{\"id\":\"jB5UHMdjpr\",\"type\":\"chart\",\"data\":{\"chart_name\":\"Last Month Board Rate\",\"col\":12}},{\"id\":\"gi-NMLZp61\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Board Rate\",\"col\":3}},{\"id\":\"UlF0vIuW_h\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"AuMMS Item\",\"col\":3}},{\"id\":\"hYF_ghyeVA\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"AuMMS Item Group\",\"col\":3}},{\"id\":\"UWuMllqZ2H\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Purity Conversion Tool\",\"col\":3}},{\"id\":\"aAr2ThZ43S\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Jewellery Invoice\",\"col\":3}},{\"id\":\"e9B31_-by6\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Jewellery Receipt\",\"col\":3}},{\"id\":\"RvEzssIYXw\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Design Request\",\"col\":3}},{\"id\":\"wGYHyDla9N\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Design Analysis\",\"col\":3}},{\"id\":\"_LyZYOL-nL\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Bill of Materials\",\"col\":3}},{\"id\":\"5uZY95JpYz\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Work Order\",\"col\":3}},{\"id\":\"HvqBLZ1Lor\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Job Card\",\"col\":3}},{\"id\":\"9w8SYT0U69\",\"type\":\"spacer\",\"data\":{\"col\":12}},{\"id\":\"7bvu06zTCN\",\"type\":\"paragraph\",\"data\":{\"text\":\"AuMMS Manufacturing\",\"col\":12}},{\"id\":\"9t9kxybNJK\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Customer Jewellery Order\",\"col\":3}},{\"id\":\"06TYM1ppyy\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Jewellery Order\",\"col\":3}},{\"id\":\"O0JGHNHtrF\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Manufacturing Request\",\"col\":3}},{\"id\":\"2s8KvBILCm\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Raw Material Request\",\"col\":3}},{\"id\":\"MNE7fNKcwd\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Raw Material Bundle\",\"col\":3}},{\"id\":\"hEIbTGUk-V\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Jewellery Job Card\",\"col\":3}},{\"id\":\"cT93WyR0mJ\",\"type\":\"header\",\"data\":{\"text\":\"Reports & Masters\",\"col\":12}},{\"id\":\"HkzazEK-HJ\",\"type\":\"card\",\"data\":{\"card_name\":\"Masters\",\"col\":4}},{\"id\":\"6hfzWxhLly\",\"type\":\"card\",\"data\":{\"card_name\":\"Settings\",\"col\":4}},{\"id\":\"GnDPsk1c5H\",\"type\":\"card\",\"data\":{\"card_name\":\"Reports\",\"col\":4}}]",
"creation": "2023-01-06 12:02:34.084523",
"custom_blocks": [],
"docstatus": 0,
@@ -152,7 +152,7 @@
"type": "Link"
}
],
- "modified": "2024-05-06 10:24:40.490084",
+ "modified": "2024-08-16 09:28:21.176711",
"modified_by": "Administrator",
"module": "AuMMS",
"name": "AuMMS",
@@ -164,6 +164,14 @@
"roles": [],
"sequence_id": 1.0,
"shortcuts": [
+ {
+ "color": "Grey",
+ "doc_view": "List",
+ "label": "Jewellery Receipt",
+ "link_to": "Jewellery Receipt",
+ "stats_filter": "[]",
+ "type": "DocType"
+ },
{
"color": "Grey",
"doc_view": "List",
diff --git a/aumms/fixtures/custom_field.json b/aumms/fixtures/custom_field.json
index 28e34817..de02b8a0 100644
--- a/aumms/fixtures/custom_field.json
+++ b/aumms/fixtures/custom_field.json
@@ -1,2037 +1,2037 @@
[
- {
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "collapsible_depends_on": null,
- "columns": 0,
- "default": null,
- "depends_on": null,
- "description": "",
- "docstatus": 0,
- "doctype": "Custom Field",
- "dt": "UOM",
- "fetch_from": null,
- "fetch_if_empty": 0,
- "fieldname": "is_purity_uom",
- "fieldtype": "Check",
- "hidden": 0,
- "hide_border": 0,
- "hide_days": 0,
- "hide_seconds": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_preview": 0,
- "in_standard_filter": 0,
- "insert_after": "column_break_3",
- "is_system_generated": 0,
- "is_virtual": 0,
- "label": "Is Purity UOM",
- "length": 0,
- "mandatory_depends_on": null,
- "modified": "2023-01-05 10:33:35.446753",
- "module": null,
- "name": "UOM-is_purity_uom",
- "no_copy": 0,
- "non_negative": 0,
- "options": null,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": null,
- "read_only": 0,
- "read_only_depends_on": null,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "show_dashboard": 0,
- "sort_options": 0,
- "translatable": 0,
- "unique": 0,
- "width": null
- },
- {
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "collapsible_depends_on": null,
- "columns": 0,
- "default": null,
- "depends_on": null,
- "description": null,
- "docstatus": 0,
- "doctype": "Custom Field",
- "dt": "Jewellery Invoice",
- "fetch_from": null,
- "fetch_if_empty": 0,
- "fieldname": "custom_total_taxes_and_charges_company_currency",
- "fieldtype": "Currency",
- "hidden": 1,
- "hide_border": 0,
- "hide_days": 0,
- "hide_seconds": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_preview": 0,
- "in_standard_filter": 0,
- "insert_after": "custom_section_break_qv4uh",
- "is_system_generated": 0,
- "is_virtual": 0,
- "label": "Total Taxes and Charges (Company Currency)",
- "length": 0,
- "mandatory_depends_on": null,
- "modified": "2024-02-07 22:15:11.279549",
- "module": null,
- "name": "Jewellery Invoice-custom_total_taxes_and_charges_company_currency",
- "no_copy": 0,
- "non_negative": 0,
- "options": "Company:company:default_currency",
- "permlevel": 0,
- "precision": "",
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "print_width": null,
- "read_only": 1,
- "read_only_depends_on": null,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "show_dashboard": 0,
- "sort_options": 0,
- "translatable": 0,
- "unique": 0,
- "width": null
- },
- {
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "collapsible_depends_on": null,
- "columns": 0,
- "default": null,
- "depends_on": null,
- "description": null,
- "docstatus": 0,
- "doctype": "Custom Field",
- "dt": "Jewellery Invoice",
- "fetch_from": null,
- "fetch_if_empty": 0,
- "fieldname": "custom_total_taxes_and_charges",
- "fieldtype": "Currency",
- "hidden": 0,
- "hide_border": 0,
- "hide_days": 0,
- "hide_seconds": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_preview": 0,
- "in_standard_filter": 0,
- "insert_after": "custom_column_break_1zplm",
- "is_system_generated": 0,
- "is_virtual": 0,
- "label": "Total Taxes and Charges",
- "length": 0,
- "mandatory_depends_on": null,
- "modified": "2024-02-07 22:15:11.742343",
- "module": null,
- "name": "Jewellery Invoice-custom_total_taxes_and_charges",
- "no_copy": 0,
- "non_negative": 0,
- "options": "currency",
- "permlevel": 0,
- "precision": "",
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "print_width": null,
- "read_only": 1,
- "read_only_depends_on": null,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "show_dashboard": 0,
- "sort_options": 0,
- "translatable": 0,
- "unique": 0,
- "width": null
- },
- {
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "collapsible_depends_on": null,
- "columns": 0,
- "default": null,
- "depends_on": null,
- "description": null,
- "docstatus": 0,
- "doctype": "Custom Field",
- "dt": "Department",
- "fetch_from": null,
- "fetch_if_empty": 0,
- "fieldname": "head_of_department",
- "fieldtype": "Link",
- "hidden": 0,
- "hide_border": 0,
- "hide_days": 0,
- "hide_seconds": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_preview": 0,
- "in_standard_filter": 0,
- "insert_after": "parent_department",
- "is_system_generated": 0,
- "is_virtual": 0,
- "label": "Head of Department",
- "length": 0,
- "mandatory_depends_on": null,
- "modified": "2023-10-20 15:16:08.680216",
- "module": null,
- "name": "Department-head_of_department",
- "no_copy": 0,
- "non_negative": 0,
- "options": "Employee",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": null,
- "read_only": 0,
- "read_only_depends_on": null,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "show_dashboard": 0,
- "sort_options": 0,
- "translatable": 0,
- "unique": 0,
- "width": null
- },
- {
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "collapsible_depends_on": null,
- "columns": 0,
- "default": null,
- "depends_on": null,
- "description": null,
- "docstatus": 0,
- "doctype": "Custom Field",
- "dt": "Purchase Invoice",
- "fetch_from": null,
- "fetch_if_empty": 0,
- "fieldname": "keep_metal_ledger",
- "fieldtype": "Check",
- "hidden": 0,
- "hide_border": 0,
- "hide_days": 0,
- "hide_seconds": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_preview": 0,
- "in_standard_filter": 0,
- "insert_after": "supplier",
- "is_system_generated": 0,
- "is_virtual": 0,
- "label": "Keep Metal Ledger",
- "length": 0,
- "mandatory_depends_on": null,
- "modified": "2023-01-19 17:11:57.835012",
- "module": null,
- "name": "Purchase Invoice-keep_metal_ledger",
- "no_copy": 0,
- "non_negative": 0,
- "options": null,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": null,
- "read_only": 0,
- "read_only_depends_on": null,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "show_dashboard": 0,
- "sort_options": 0,
- "translatable": 0,
- "unique": 0,
- "width": null
- },
- {
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "collapsible_depends_on": null,
- "columns": 0,
- "default": null,
- "depends_on": null,
- "description": null,
- "docstatus": 0,
- "doctype": "Custom Field",
- "dt": "Item Group",
- "fetch_from": null,
- "fetch_if_empty": 0,
- "fieldname": "is_aumms_item_group",
- "fieldtype": "Check",
- "hidden": 0,
- "hide_border": 0,
- "hide_days": 0,
- "hide_seconds": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_preview": 0,
- "in_standard_filter": 0,
- "insert_after": "image",
- "is_system_generated": 0,
- "is_virtual": 0,
- "label": "Is AuMMS Item Group",
- "length": 0,
- "mandatory_depends_on": null,
- "modified": "2023-08-10 16:44:07.982502",
- "module": null,
- "name": "Item Group-is_aumms_item_group",
- "no_copy": 0,
- "non_negative": 0,
- "options": null,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": null,
- "read_only": 1,
- "read_only_depends_on": null,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "show_dashboard": 0,
- "sort_options": 0,
- "translatable": 0,
- "unique": 0,
- "width": null
- },
- {
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "collapsible_depends_on": null,
- "columns": 0,
- "default": null,
- "depends_on": null,
- "description": null,
- "docstatus": 0,
- "doctype": "Custom Field",
- "dt": "Job Card",
- "fetch_from": "work_order.assigned_to",
- "fetch_if_empty": 0,
- "fieldname": "assigned_to",
- "fieldtype": "Link",
- "hidden": 0,
- "hide_border": 0,
- "hide_days": 0,
- "hide_seconds": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_preview": 0,
- "in_standard_filter": 0,
- "insert_after": "employee",
- "is_system_generated": 0,
- "is_virtual": 0,
- "label": "Assigned To",
- "length": 0,
- "mandatory_depends_on": null,
- "modified": "2023-11-15 12:12:19.890413",
- "module": null,
- "name": "Job Card-assigned_to",
- "no_copy": 0,
- "non_negative": 0,
- "options": "Smith",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": null,
- "read_only": 0,
- "read_only_depends_on": null,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "show_dashboard": 0,
- "sort_options": 0,
- "translatable": 0,
- "unique": 0,
- "width": null
- },
- {
- "allow_in_quick_entry": 1,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "collapsible_depends_on": null,
- "columns": 0,
- "default": null,
- "depends_on": "",
- "description": null,
- "docstatus": 0,
- "doctype": "Custom Field",
- "dt": "Item",
- "fetch_from": "item_group.item_type",
- "fetch_if_empty": 1,
- "fieldname": "item_type",
- "fieldtype": "Link",
- "hidden": 0,
- "hide_border": 0,
- "hide_days": 0,
- "hide_seconds": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_preview": 0,
- "in_standard_filter": 0,
- "insert_after": "item_group",
- "is_system_generated": 0,
- "is_virtual": 0,
- "label": "Item Type",
- "length": 0,
- "mandatory_depends_on": "",
- "modified": "2023-01-06 16:49:20.501863",
- "module": null,
- "name": "Item-item_type",
- "no_copy": 0,
- "non_negative": 0,
- "options": "Item Type",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": null,
- "read_only": 0,
- "read_only_depends_on": null,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "show_dashboard": 0,
- "sort_options": 0,
- "translatable": 0,
- "unique": 0,
- "width": null
- },
- {
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "collapsible_depends_on": null,
- "columns": 0,
- "default": null,
- "depends_on": null,
- "description": null,
- "docstatus": 0,
- "doctype": "Custom Field",
- "dt": "Job Card",
- "fetch_from": "assigned_to.employee",
- "fetch_if_empty": 0,
- "fieldname": "assigned_employee",
- "fieldtype": "Link",
- "hidden": 1,
- "hide_border": 0,
- "hide_days": 0,
- "hide_seconds": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_preview": 0,
- "in_standard_filter": 0,
- "insert_after": "assigned_to",
- "is_system_generated": 0,
- "is_virtual": 0,
- "label": "Assigned Employee",
- "length": 0,
- "mandatory_depends_on": null,
- "modified": "2023-11-15 12:32:11.204644",
- "module": null,
- "name": "Job Card-assigned_employee",
- "no_copy": 0,
- "non_negative": 0,
- "options": "Employee",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": null,
- "read_only": 1,
- "read_only_depends_on": null,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "show_dashboard": 0,
- "sort_options": 0,
- "translatable": 0,
- "unique": 0,
- "width": null
- },
- {
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "collapsible_depends_on": null,
- "columns": 0,
- "default": null,
- "depends_on": null,
- "description": null,
- "docstatus": 0,
- "doctype": "Custom Field",
- "dt": "Item Group",
- "fetch_from": "parent_item_group.item_type",
- "fetch_if_empty": 1,
- "fieldname": "item_type",
- "fieldtype": "Link",
- "hidden": 0,
- "hide_border": 0,
- "hide_days": 0,
- "hide_seconds": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_preview": 0,
- "in_standard_filter": 0,
- "insert_after": "column_break_5",
- "is_system_generated": 0,
- "is_virtual": 0,
- "label": "Item Type",
- "length": 0,
- "mandatory_depends_on": null,
- "modified": "2023-01-05 15:09:57.352372",
- "module": null,
- "name": "Item Group-item_type",
- "no_copy": 0,
- "non_negative": 0,
- "options": "Item Type",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": null,
- "read_only": 0,
- "read_only_depends_on": "",
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "show_dashboard": 0,
- "sort_options": 0,
- "translatable": 0,
- "unique": 0,
- "width": null
- },
- {
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "collapsible_depends_on": null,
- "columns": 0,
- "default": null,
- "depends_on": null,
- "description": null,
- "docstatus": 0,
- "doctype": "Custom Field",
- "dt": "Purchase Receipt",
- "fetch_from": null,
- "fetch_if_empty": 0,
- "fieldname": "party_link",
- "fieldtype": "Link",
- "hidden": 0,
- "hide_border": 0,
- "hide_days": 0,
- "hide_seconds": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_preview": 0,
- "in_standard_filter": 0,
- "insert_after": "supplier_delivery_note",
- "is_system_generated": 0,
- "is_virtual": 0,
- "label": "Party Link",
- "length": 0,
- "mandatory_depends_on": null,
- "modified": "2023-01-27 16:49:36.956964",
- "module": null,
- "name": "Purchase Receipt-party_link",
- "no_copy": 0,
- "non_negative": 0,
- "options": "Party Link",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": null,
- "read_only": 1,
- "read_only_depends_on": null,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "show_dashboard": 0,
- "sort_options": 0,
- "translatable": 0,
- "unique": 0,
- "width": null
- },
- {
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "collapsible_depends_on": null,
- "columns": 0,
- "default": null,
- "depends_on": "eval:doc.is_purity_item",
- "description": null,
- "docstatus": 0,
- "doctype": "Custom Field",
- "dt": "Item",
- "fetch_from": "item_group.making_charge_based_on",
- "fetch_if_empty": 1,
- "fieldname": "making_charge_based_on",
- "fieldtype": "Select",
- "hidden": 0,
- "hide_border": 0,
- "hide_days": 0,
- "hide_seconds": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_preview": 0,
- "in_standard_filter": 0,
- "insert_after": "stock_uom",
- "is_system_generated": 0,
- "is_virtual": 0,
- "label": "Making Charge Based On",
- "length": 0,
- "mandatory_depends_on": null,
- "modified": "2023-01-05 17:32:05.643181",
- "module": null,
- "name": "Item-making_charge_based_on",
- "no_copy": 0,
- "non_negative": 0,
- "options": "\nFixed\nPercentage",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": null,
- "read_only": 0,
- "read_only_depends_on": null,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "show_dashboard": 0,
- "sort_options": 0,
- "translatable": 1,
- "unique": 0,
- "width": null
- },
- {
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "collapsible_depends_on": null,
- "columns": 0,
- "default": null,
- "depends_on": null,
- "description": null,
- "docstatus": 0,
- "doctype": "Custom Field",
- "dt": "Employee",
- "fetch_from": null,
- "fetch_if_empty": 0,
- "fieldname": "custom_warehouse",
- "fieldtype": "Link",
- "hidden": 0,
- "hide_border": 0,
- "hide_days": 0,
- "hide_seconds": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_preview": 0,
- "in_standard_filter": 0,
- "insert_after": "employee_name",
- "is_system_generated": 0,
- "is_virtual": 0,
- "label": "Warehouse",
- "length": 0,
- "mandatory_depends_on": null,
- "modified": "2024-04-29 14:36:36.781226",
- "module": null,
- "name": "Employee-custom_warehouse",
- "no_copy": 0,
- "non_negative": 0,
- "options": "Warehouse",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": null,
- "read_only": 0,
- "read_only_depends_on": null,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "show_dashboard": 0,
- "sort_options": 0,
- "translatable": 0,
- "unique": 0,
- "width": null
- },
- {
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "collapsible_depends_on": null,
- "columns": 0,
- "default": null,
- "depends_on": "",
- "description": null,
- "docstatus": 0,
- "doctype": "Custom Field",
- "dt": "Item Group",
- "fetch_from": "item_type.is_purity_item",
- "fetch_if_empty": 0,
- "fieldname": "is_purity_item",
- "fieldtype": "Check",
- "hidden": 1,
- "hide_border": 0,
- "hide_days": 0,
- "hide_seconds": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_preview": 0,
- "in_standard_filter": 0,
- "insert_after": "item_type",
- "is_system_generated": 0,
- "is_virtual": 0,
- "label": "Is Purity Item",
- "length": 0,
- "mandatory_depends_on": null,
- "modified": "2023-01-31 12:41:20.505617",
- "module": null,
- "name": "Item Group-is_purity_item",
- "no_copy": 0,
- "non_negative": 0,
- "options": null,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": null,
- "read_only": 1,
- "read_only_depends_on": null,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "show_dashboard": 0,
- "sort_options": 0,
- "translatable": 0,
- "unique": 0,
- "width": null
- },
- {
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "collapsible_depends_on": null,
- "columns": 0,
- "default": null,
- "depends_on": "eval: doc.is_purity_item",
- "description": null,
- "docstatus": 0,
- "doctype": "Custom Field",
- "dt": "Item Group",
- "fetch_from": null,
- "fetch_if_empty": 0,
- "fieldname": "making_charge_based_on",
- "fieldtype": "Select",
- "hidden": 0,
- "hide_border": 0,
- "hide_days": 0,
- "hide_seconds": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_preview": 0,
- "in_standard_filter": 0,
- "insert_after": "is_purity_item",
- "is_system_generated": 0,
- "is_virtual": 0,
- "label": "Making Charge Based On",
- "length": 0,
- "mandatory_depends_on": null,
- "modified": "2023-01-05 10:54:18.536026",
- "module": null,
- "name": "Item Group-making_charge_based_on",
- "no_copy": 0,
- "non_negative": 0,
- "options": "\nFixed\nPercentage",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": null,
- "read_only": 0,
- "read_only_depends_on": null,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "show_dashboard": 0,
- "sort_options": 0,
- "translatable": 0,
- "unique": 0,
- "width": null
- },
- {
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "collapsible_depends_on": null,
- "columns": 0,
- "default": null,
- "depends_on": "eval: doc.making_charge_based_on == 'Percentage' && doc.is_purity_item",
- "description": null,
- "docstatus": 0,
- "doctype": "Custom Field",
- "dt": "Item",
- "fetch_from": "item_group.percentage",
- "fetch_if_empty": 1,
- "fieldname": "making_charge_percentage",
- "fieldtype": "Percent",
- "hidden": 0,
- "hide_border": 0,
- "hide_days": 0,
- "hide_seconds": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_preview": 0,
- "in_standard_filter": 0,
- "insert_after": "making_charge_based_on",
- "is_system_generated": 0,
- "is_virtual": 0,
- "label": "Making Charge Percentage",
- "length": 0,
- "mandatory_depends_on": "eval: doc.making_charge_based_on == 'Percentage'",
- "modified": "2023-01-05 15:09:29.804481",
- "module": null,
- "name": "Item-making_charge_percentage",
- "no_copy": 0,
- "non_negative": 0,
- "options": null,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": null,
- "read_only": 0,
- "read_only_depends_on": null,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "show_dashboard": 0,
- "sort_options": 0,
- "translatable": 0,
- "unique": 0,
- "width": null
- },
- {
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "collapsible_depends_on": null,
- "columns": 0,
- "default": null,
- "depends_on": "eval: doc.making_charge_based_on == 'Percentage'",
- "description": null,
- "docstatus": 0,
- "doctype": "Custom Field",
- "dt": "Item Group",
- "fetch_from": null,
- "fetch_if_empty": 0,
- "fieldname": "percentage",
- "fieldtype": "Percent",
- "hidden": 0,
- "hide_border": 0,
- "hide_days": 0,
- "hide_seconds": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_preview": 0,
- "in_standard_filter": 0,
- "insert_after": "making_charge_based_on",
- "is_system_generated": 0,
- "is_virtual": 0,
- "label": "Percentage",
- "length": 0,
- "mandatory_depends_on": "eval: doc.making_charge_based_on == 'Percentage'",
- "modified": "2023-01-05 11:41:02.132844",
- "module": null,
- "name": "Item Group-percentage",
- "no_copy": 0,
- "non_negative": 0,
- "options": null,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": null,
- "read_only": 0,
- "read_only_depends_on": null,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "show_dashboard": 0,
- "sort_options": 0,
- "translatable": 0,
- "unique": 0,
- "width": null
- },
- {
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "collapsible_depends_on": null,
- "columns": 0,
- "default": null,
- "depends_on": "eval: doc.making_charge_based_on == 'Fixed' && doc.is_purity_item",
- "description": null,
- "docstatus": 0,
- "doctype": "Custom Field",
- "dt": "Item",
- "fetch_from": "item_group.currency",
- "fetch_if_empty": 1,
- "fieldname": "making_charge",
- "fieldtype": "Currency",
- "hidden": 0,
- "hide_border": 0,
- "hide_days": 0,
- "hide_seconds": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_preview": 0,
- "in_standard_filter": 0,
- "insert_after": "making_charge_percentage",
- "is_system_generated": 0,
- "is_virtual": 0,
- "label": "Making Charge",
- "length": 0,
- "mandatory_depends_on": "eval: doc.making_charge_based_on == 'Fixed'",
- "modified": "2023-01-06 11:28:22.995811",
- "module": null,
- "name": "Item-making_charge",
- "no_copy": 0,
- "non_negative": 0,
- "options": null,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": null,
- "read_only": 0,
- "read_only_depends_on": null,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "show_dashboard": 0,
- "sort_options": 0,
- "translatable": 0,
- "unique": 0,
- "width": null
- },
- {
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "collapsible_depends_on": null,
- "columns": 0,
- "default": null,
- "depends_on": "eval: doc.making_charge_based_on == 'Fixed'",
- "description": null,
- "docstatus": 0,
- "doctype": "Custom Field",
- "dt": "Item Group",
- "fetch_from": null,
- "fetch_if_empty": 0,
- "fieldname": "currency",
- "fieldtype": "Currency",
- "hidden": 0,
- "hide_border": 0,
- "hide_days": 0,
- "hide_seconds": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_preview": 0,
- "in_standard_filter": 0,
- "insert_after": "percentage",
- "is_system_generated": 0,
- "is_virtual": 0,
- "label": "Currency",
- "length": 0,
- "mandatory_depends_on": "eval: doc.making_charge_based_on == 'Fixed'",
- "modified": "2023-01-05 12:43:08.976116",
- "module": null,
- "name": "Item Group-currency",
- "no_copy": 0,
- "non_negative": 0,
- "options": null,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": null,
- "read_only": 0,
- "read_only_depends_on": null,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "show_dashboard": 0,
- "sort_options": 0,
- "translatable": 0,
- "unique": 0,
- "width": null
- },
- {
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "collapsible_depends_on": null,
- "columns": 0,
- "default": null,
- "depends_on": null,
- "description": null,
- "docstatus": 0,
- "doctype": "Custom Field",
- "dt": "Item Group",
- "fetch_from": null,
- "fetch_if_empty": 0,
- "fieldname": "is_sales_item",
- "fieldtype": "Check",
- "hidden": 0,
- "hide_border": 0,
- "hide_days": 0,
- "hide_seconds": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_preview": 0,
- "in_standard_filter": 0,
- "insert_after": "currency",
- "is_system_generated": 0,
- "is_virtual": 0,
- "label": "Is Sales Item",
- "length": 0,
- "mandatory_depends_on": null,
- "modified": "2023-01-11 15:57:23.780415",
- "module": null,
- "name": "Item Group-is_sales_item",
- "no_copy": 0,
- "non_negative": 0,
- "options": null,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": null,
- "read_only": 0,
- "read_only_depends_on": null,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "show_dashboard": 0,
- "sort_options": 0,
- "translatable": 0,
- "unique": 0,
- "width": null
- },
- {
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "collapsible_depends_on": null,
- "columns": 0,
- "default": null,
- "depends_on": null,
- "description": null,
- "docstatus": 0,
- "doctype": "Custom Field",
- "dt": "Purchase Receipt",
- "fetch_from": null,
- "fetch_if_empty": 0,
- "fieldname": "keep_metal_ledger",
- "fieldtype": "Check",
- "hidden": 0,
- "hide_border": 0,
- "hide_days": 0,
- "hide_seconds": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_preview": 0,
- "in_standard_filter": 0,
- "insert_after": "set_posting_time",
- "is_system_generated": 0,
- "is_virtual": 0,
- "label": "Keep Metal Ledger",
- "length": 0,
- "mandatory_depends_on": null,
- "modified": "2023-01-19 16:51:12.721967",
- "module": null,
- "name": "Purchase Receipt-keep_metal_ledger",
- "no_copy": 0,
- "non_negative": 0,
- "options": null,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": null,
- "read_only": 0,
- "read_only_depends_on": null,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "show_dashboard": 0,
- "sort_options": 0,
- "translatable": 0,
- "unique": 0,
- "width": null
- },
- {
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "collapsible_depends_on": null,
- "columns": 0,
- "default": null,
- "depends_on": null,
- "description": null,
- "docstatus": 0,
- "doctype": "Custom Field",
- "dt": "Item Group",
- "fetch_from": null,
- "fetch_if_empty": 0,
- "fieldname": "is_purchase_item",
- "fieldtype": "Check",
- "hidden": 0,
- "hide_border": 0,
- "hide_days": 0,
- "hide_seconds": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_preview": 0,
- "in_standard_filter": 0,
- "insert_after": "is_sales_item",
- "is_system_generated": 0,
- "is_virtual": 0,
- "label": "Is Purchase Item",
- "length": 0,
- "mandatory_depends_on": null,
- "modified": "2023-01-11 15:57:25.254765",
- "module": null,
- "name": "Item Group-is_purchase_item",
- "no_copy": 0,
- "non_negative": 0,
- "options": null,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": null,
- "read_only": 0,
- "read_only_depends_on": null,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "show_dashboard": 0,
- "sort_options": 0,
- "translatable": 0,
- "unique": 0,
- "width": null
- },
- {
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "collapsible_depends_on": null,
- "columns": 0,
- "default": null,
- "depends_on": "eval:doc.is_purity_item",
- "description": null,
- "docstatus": 0,
- "doctype": "Custom Field",
- "dt": "Item",
- "fetch_from": "purity.purity_percentage",
- "fetch_if_empty": 0,
- "fieldname": "purity_percentage",
- "fieldtype": "Percent",
- "hidden": 0,
- "hide_border": 0,
- "hide_days": 0,
- "hide_seconds": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_preview": 0,
- "in_standard_filter": 0,
- "insert_after": "purity",
- "is_system_generated": 0,
- "is_virtual": 0,
- "label": "Purity Percentage",
- "length": 0,
- "mandatory_depends_on": null,
- "modified": "2023-01-06 14:48:46.579229",
- "module": null,
- "name": "Item-purity_percentage",
- "no_copy": 0,
- "non_negative": 0,
- "options": null,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": null,
- "read_only": 1,
- "read_only_depends_on": null,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "show_dashboard": 0,
- "sort_options": 0,
- "translatable": 0,
- "unique": 0,
- "width": null
- },
- {
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "collapsible_depends_on": null,
- "columns": 0,
- "default": null,
- "depends_on": null,
- "description": null,
- "docstatus": 0,
- "doctype": "Custom Field",
- "dt": "Purchase Receipt",
- "fetch_from": null,
- "fetch_if_empty": 0,
- "fieldname": "create_invoice_on_submit",
- "fieldtype": "Check",
- "hidden": 1,
- "hide_border": 0,
- "hide_days": 0,
- "hide_seconds": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_preview": 0,
- "in_standard_filter": 0,
- "insert_after": "keep_metal_ledger",
- "is_system_generated": 0,
- "is_virtual": 0,
- "label": "Create Invoice on Submit",
- "length": 0,
- "mandatory_depends_on": null,
- "modified": "2023-08-23 15:44:29.173542",
- "module": null,
- "name": "Purchase Receipt-create_invoice_on_submit",
- "no_copy": 0,
- "non_negative": 0,
- "options": null,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": null,
- "read_only": 1,
- "read_only_depends_on": null,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "show_dashboard": 0,
- "sort_options": 0,
- "translatable": 0,
- "unique": 0,
- "width": null
- },
- {
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "collapsible_depends_on": null,
- "columns": 0,
- "default": null,
- "depends_on": null,
- "description": null,
- "docstatus": 0,
- "doctype": "Custom Field",
- "dt": "Work Order",
- "fetch_from": null,
- "fetch_if_empty": 0,
- "fieldname": "assigned_to",
- "fieldtype": "Link",
- "hidden": 0,
- "hide_border": 0,
- "hide_days": 0,
- "hide_seconds": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_preview": 0,
- "in_standard_filter": 0,
- "insert_after": "project",
- "is_system_generated": 0,
- "is_virtual": 0,
- "label": "Assigned To",
- "length": 0,
- "mandatory_depends_on": null,
- "modified": "2023-11-14 12:22:34.239256",
- "module": null,
- "name": "Work Order-assigned_to",
- "no_copy": 0,
- "non_negative": 0,
- "options": "Smith",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": null,
- "read_only": 0,
- "read_only_depends_on": null,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "show_dashboard": 0,
- "sort_options": 0,
- "translatable": 0,
- "unique": 0,
- "width": null
- },
- {
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "collapsible_depends_on": null,
- "columns": 0,
- "default": null,
- "depends_on": null,
- "description": null,
- "docstatus": 0,
- "doctype": "Custom Field",
- "dt": "Purchase Invoice Item",
- "fetch_from": "item_code.item_type",
- "fetch_if_empty": 0,
- "fieldname": "item_type",
- "fieldtype": "Link",
- "hidden": 0,
- "hide_border": 0,
- "hide_days": 0,
- "hide_seconds": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_preview": 0,
- "in_standard_filter": 0,
- "insert_after": "rejected_qty",
- "is_system_generated": 0,
- "is_virtual": 0,
- "label": "Item Type",
- "length": 0,
- "mandatory_depends_on": null,
- "modified": "2023-01-11 12:31:08.595209",
- "module": null,
- "name": "Purchase Invoice Item-item_type",
- "no_copy": 0,
- "non_negative": 0,
- "options": "Item Type",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": null,
- "read_only": 0,
- "read_only_depends_on": null,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "show_dashboard": 0,
- "sort_options": 0,
- "translatable": 0,
- "unique": 0,
- "width": null
- },
- {
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "collapsible_depends_on": null,
- "columns": 0,
- "default": null,
- "depends_on": null,
- "description": null,
- "docstatus": 0,
- "doctype": "Custom Field",
- "dt": "Work Order",
- "fetch_from": "assigned_to.smith_name",
- "fetch_if_empty": 1,
- "fieldname": "smith_name",
- "fieldtype": "Data",
- "hidden": 0,
- "hide_border": 0,
- "hide_days": 0,
- "hide_seconds": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_preview": 0,
- "in_standard_filter": 0,
- "insert_after": "assigned_to",
- "is_system_generated": 0,
- "is_virtual": 0,
- "label": "Smith Name",
- "length": 0,
- "mandatory_depends_on": null,
- "modified": "2023-11-14 12:48:04.270472",
- "module": null,
- "name": "Work Order-smith_name",
- "no_copy": 0,
- "non_negative": 0,
- "options": null,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": null,
- "read_only": 0,
- "read_only_depends_on": null,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "show_dashboard": 0,
- "sort_options": 0,
- "translatable": 0,
- "unique": 0,
- "width": null
- },
- {
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "collapsible_depends_on": null,
- "columns": 0,
- "default": null,
- "depends_on": null,
- "description": null,
- "docstatus": 0,
- "doctype": "Custom Field",
- "dt": "Item",
- "fetch_from": null,
- "fetch_if_empty": 0,
- "fieldname": "is_aumms_item",
- "fieldtype": "Check",
- "hidden": 0,
- "hide_border": 0,
- "hide_days": 0,
- "hide_seconds": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_preview": 0,
- "in_standard_filter": 0,
- "insert_after": "disabled",
- "is_system_generated": 0,
- "is_virtual": 0,
- "label": "Is AuMMS Item",
- "length": 0,
- "mandatory_depends_on": null,
- "modified": "2023-08-10 16:32:46.294462",
- "module": null,
- "name": "Item-is_aumms_item",
- "no_copy": 0,
- "non_negative": 0,
- "options": null,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": null,
- "read_only": 1,
- "read_only_depends_on": null,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "show_dashboard": 0,
- "sort_options": 0,
- "translatable": 0,
- "unique": 0,
- "width": null
- },
- {
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "collapsible_depends_on": null,
- "columns": 0,
- "default": null,
- "depends_on": null,
- "description": null,
- "docstatus": 0,
- "doctype": "Custom Field",
- "dt": "Item",
- "fetch_from": null,
- "fetch_if_empty": 0,
- "fieldname": "custom_is_raw_material",
- "fieldtype": "Check",
- "hidden": 0,
- "hide_border": 0,
- "hide_days": 0,
- "hide_seconds": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_preview": 0,
- "in_standard_filter": 0,
- "insert_after": "is_aumms_item",
- "is_system_generated": 0,
- "is_virtual": 0,
- "label": "Is Raw Material",
- "length": 0,
- "mandatory_depends_on": null,
- "modified": "2024-03-20 12:16:05.286660",
- "module": null,
- "name": "Item-custom_is_raw_material",
- "no_copy": 0,
- "non_negative": 0,
- "options": null,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": null,
- "read_only": 0,
- "read_only_depends_on": null,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "show_dashboard": 0,
- "sort_options": 0,
- "translatable": 0,
- "unique": 0,
- "width": null
- },
- {
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "collapsible_depends_on": null,
- "columns": 0,
- "default": null,
- "depends_on": null,
- "description": null,
- "docstatus": 0,
- "doctype": "Custom Field",
- "dt": "Sales Order",
- "fetch_from": null,
- "fetch_if_empty": 0,
- "fieldname": "keep_metal_ledger",
- "fieldtype": "Check",
- "hidden": 1,
- "hide_border": 0,
- "hide_days": 0,
- "hide_seconds": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_preview": 0,
- "in_standard_filter": 0,
- "insert_after": "amended_from",
- "is_system_generated": 0,
- "is_virtual": 0,
- "label": "Keep Metal Ledger",
- "length": 0,
- "mandatory_depends_on": null,
- "modified": "2023-08-23 15:14:10.150999",
- "module": null,
- "name": "Sales Order-keep_metal_ledger",
- "no_copy": 0,
- "non_negative": 0,
- "options": null,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": null,
- "read_only": 1,
- "read_only_depends_on": null,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "show_dashboard": 0,
- "sort_options": 0,
- "translatable": 0,
- "unique": 0,
- "width": null
- },
- {
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "collapsible_depends_on": null,
- "columns": 0,
- "default": null,
- "depends_on": null,
- "description": null,
- "docstatus": 0,
- "doctype": "Custom Field",
- "dt": "Jewellery Invoice",
- "fetch_from": null,
- "fetch_if_empty": 0,
- "fieldname": "custom_taxes_and_charges",
- "fieldtype": "Section Break",
- "hidden": 0,
- "hide_border": 0,
- "hide_days": 0,
- "hide_seconds": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_preview": 0,
- "in_standard_filter": 0,
- "insert_after": "total_gold_amount",
- "is_system_generated": 0,
- "is_virtual": 0,
- "label": "Taxes and Charges",
- "length": 0,
- "mandatory_depends_on": null,
- "modified": "2024-02-07 22:15:10.690293",
- "module": null,
- "name": "Jewellery Invoice-custom_taxes_and_charges",
- "no_copy": 0,
- "non_negative": 0,
- "options": null,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": null,
- "read_only": 0,
- "read_only_depends_on": null,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "show_dashboard": 0,
- "sort_options": 0,
- "translatable": 0,
- "unique": 0,
- "width": null
- },
- {
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "collapsible_depends_on": null,
- "columns": 0,
- "default": null,
- "depends_on": null,
- "description": null,
- "docstatus": 0,
- "doctype": "Custom Field",
- "dt": "Sales Invoice",
- "fetch_from": null,
- "fetch_if_empty": 0,
- "fieldname": "keep_metal_ledger",
- "fieldtype": "Check",
- "hidden": 0,
- "hide_border": 0,
- "hide_days": 0,
- "hide_seconds": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_preview": 0,
- "in_standard_filter": 0,
- "insert_after": "is_debit_note",
- "is_system_generated": 0,
- "is_virtual": 0,
- "label": "Keep Metal Ledger",
- "length": 0,
- "mandatory_depends_on": null,
- "modified": "2023-01-19 15:29:50.710586",
- "module": null,
- "name": "Sales Invoice-keep_metal_ledger",
- "no_copy": 0,
- "non_negative": 0,
- "options": null,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": null,
- "read_only": 0,
- "read_only_depends_on": null,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "show_dashboard": 0,
- "sort_options": 0,
- "translatable": 0,
- "unique": 0,
- "width": null
- },
- {
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "collapsible_depends_on": null,
- "columns": 0,
- "default": null,
- "depends_on": null,
- "description": null,
- "docstatus": 0,
- "doctype": "Custom Field",
- "dt": "Jewellery Invoice",
- "fetch_from": null,
- "fetch_if_empty": 0,
- "fieldname": "custom_sales_taxes_and_charges",
- "fieldtype": "Table",
- "hidden": 0,
- "hide_border": 0,
- "hide_days": 0,
- "hide_seconds": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_preview": 0,
- "in_standard_filter": 0,
- "insert_after": "sales_taxes_and_charges_template",
- "is_system_generated": 0,
- "is_virtual": 0,
- "label": "Sales Taxes and Charges",
- "length": 0,
- "mandatory_depends_on": null,
- "modified": "2024-02-07 22:15:11.034978",
- "module": null,
- "name": "Jewellery Invoice-custom_sales_taxes_and_charges",
- "no_copy": 0,
- "non_negative": 0,
- "options": "Sales Taxes and Charges",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": null,
- "read_only": 0,
- "read_only_depends_on": null,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "show_dashboard": 0,
- "sort_options": 0,
- "translatable": 0,
- "unique": 0,
- "width": null
- },
- {
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "collapsible_depends_on": null,
- "columns": 0,
- "default": null,
- "depends_on": null,
- "description": null,
- "docstatus": 0,
- "doctype": "Custom Field",
- "dt": "Item",
- "fetch_from": null,
- "fetch_if_empty": 0,
- "fieldname": "custom_item_qr_code",
- "fieldtype": "Image",
- "hidden": 0,
- "hide_border": 0,
- "hide_days": 0,
- "hide_seconds": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_preview": 0,
- "in_standard_filter": 0,
- "insert_after": "item_qr",
- "is_system_generated": 0,
- "is_virtual": 0,
- "label": "Item QR Code",
- "length": 0,
- "mandatory_depends_on": null,
- "modified": "2024-02-15 12:27:24.365547",
- "module": null,
- "name": "Item-custom_item_qr_code",
- "no_copy": 0,
- "non_negative": 0,
- "options": "item_qr",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": null,
- "read_only": 0,
- "read_only_depends_on": null,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "show_dashboard": 0,
- "sort_options": 0,
- "translatable": 0,
- "unique": 0,
- "width": null
- },
- {
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "collapsible_depends_on": null,
- "columns": 0,
- "default": "0",
- "depends_on": "",
- "description": null,
- "docstatus": 0,
- "doctype": "Custom Field",
- "dt": "Item",
- "fetch_from": null,
- "fetch_if_empty": 0,
- "fieldname": "gold_weight",
- "fieldtype": "Float",
- "hidden": 0,
- "hide_border": 0,
- "hide_days": 0,
- "hide_seconds": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_preview": 0,
- "in_standard_filter": 0,
- "insert_after": "warranty_period",
- "is_system_generated": 0,
- "is_virtual": 0,
- "label": "Gold Weight",
- "length": 0,
- "mandatory_depends_on": "",
- "modified": "2023-08-10 16:25:51.557590",
- "module": null,
- "name": "Item-gold_weight",
- "no_copy": 0,
- "non_negative": 0,
- "options": null,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": null,
- "read_only": 0,
- "read_only_depends_on": null,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "show_dashboard": 0,
- "sort_options": 0,
- "translatable": 0,
- "unique": 0,
- "width": null
- },
- {
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "collapsible_depends_on": null,
- "columns": 0,
- "default": null,
- "depends_on": "",
- "description": null,
- "docstatus": 0,
- "doctype": "Custom Field",
- "dt": "Item",
- "fetch_from": null,
- "fetch_if_empty": 0,
- "fieldname": "has_stone",
- "fieldtype": "Check",
- "hidden": 0,
- "hide_border": 0,
- "hide_days": 0,
- "hide_seconds": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_preview": 0,
- "in_standard_filter": 0,
- "insert_after": "weight_uom",
- "is_system_generated": 0,
- "is_virtual": 0,
- "label": "Has Stone",
- "length": 0,
- "mandatory_depends_on": null,
- "modified": "2023-08-10 16:19:51.484765",
- "module": null,
- "name": "Item-has_stone",
- "no_copy": 0,
- "non_negative": 0,
- "options": null,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": null,
- "read_only": 0,
- "read_only_depends_on": null,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "show_dashboard": 0,
- "sort_options": 0,
- "translatable": 0,
- "unique": 0,
- "width": null
- },
- {
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "collapsible_depends_on": null,
- "columns": 0,
- "default": "0",
- "depends_on": "has_stone",
- "description": null,
- "docstatus": 0,
- "doctype": "Custom Field",
- "dt": "Item",
- "fetch_from": null,
- "fetch_if_empty": 0,
- "fieldname": "stone_charge",
- "fieldtype": "Currency",
- "hidden": 0,
- "hide_border": 0,
- "hide_days": 0,
- "hide_seconds": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_preview": 0,
- "in_standard_filter": 0,
- "insert_after": "stone_weight",
- "is_system_generated": 0,
- "is_virtual": 0,
- "label": "Stone Charge",
- "length": 0,
- "mandatory_depends_on": null,
- "modified": "2023-08-10 16:22:43.694341",
- "module": null,
- "name": "Item-stone_charge",
- "no_copy": 0,
- "non_negative": 0,
- "options": null,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": null,
- "read_only": 0,
- "read_only_depends_on": null,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "show_dashboard": 0,
- "sort_options": 0,
- "translatable": 0,
- "unique": 0,
- "width": null
- }
-]
\ No newline at end of file
+ {
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "collapsible_depends_on": null,
+ "columns": 0,
+ "default": null,
+ "depends_on": null,
+ "description": "",
+ "docstatus": 0,
+ "doctype": "Custom Field",
+ "dt": "UOM",
+ "fetch_from": null,
+ "fetch_if_empty": 0,
+ "fieldname": "is_purity_uom",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "hide_border": 0,
+ "hide_days": 0,
+ "hide_seconds": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_preview": 0,
+ "in_standard_filter": 0,
+ "insert_after": "column_break_3",
+ "is_system_generated": 0,
+ "is_virtual": 0,
+ "label": "Is Purity UOM",
+ "length": 0,
+ "mandatory_depends_on": null,
+ "modified": "2023-01-05 10:33:35.446753",
+ "module": null,
+ "name": "UOM-is_purity_uom",
+ "no_copy": 0,
+ "non_negative": 0,
+ "options": null,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "print_width": null,
+ "read_only": 0,
+ "read_only_depends_on": null,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "show_dashboard": 0,
+ "sort_options": 0,
+ "translatable": 0,
+ "unique": 0,
+ "width": null
+ },
+ {
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "collapsible_depends_on": null,
+ "columns": 0,
+ "default": null,
+ "depends_on": null,
+ "description": null,
+ "docstatus": 0,
+ "doctype": "Custom Field",
+ "dt": "Jewellery Invoice",
+ "fetch_from": null,
+ "fetch_if_empty": 0,
+ "fieldname": "custom_total_taxes_and_charges_company_currency",
+ "fieldtype": "Currency",
+ "hidden": 1,
+ "hide_border": 0,
+ "hide_days": 0,
+ "hide_seconds": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_preview": 0,
+ "in_standard_filter": 0,
+ "insert_after": "custom_section_break_qv4uh",
+ "is_system_generated": 0,
+ "is_virtual": 0,
+ "label": "Total Taxes and Charges (Company Currency)",
+ "length": 0,
+ "mandatory_depends_on": null,
+ "modified": "2024-02-07 22:15:11.279549",
+ "module": null,
+ "name": "Jewellery Invoice-custom_total_taxes_and_charges_company_currency",
+ "no_copy": 0,
+ "non_negative": 0,
+ "options": "Company:company:default_currency",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "print_width": null,
+ "read_only": 1,
+ "read_only_depends_on": null,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "show_dashboard": 0,
+ "sort_options": 0,
+ "translatable": 0,
+ "unique": 0,
+ "width": null
+ },
+ {
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "collapsible_depends_on": null,
+ "columns": 0,
+ "default": null,
+ "depends_on": null,
+ "description": null,
+ "docstatus": 0,
+ "doctype": "Custom Field",
+ "dt": "Jewellery Invoice",
+ "fetch_from": null,
+ "fetch_if_empty": 0,
+ "fieldname": "custom_total_taxes_and_charges",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "hide_border": 0,
+ "hide_days": 0,
+ "hide_seconds": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_preview": 0,
+ "in_standard_filter": 0,
+ "insert_after": "custom_column_break_1zplm",
+ "is_system_generated": 0,
+ "is_virtual": 0,
+ "label": "Total Taxes and Charges",
+ "length": 0,
+ "mandatory_depends_on": null,
+ "modified": "2024-02-07 22:15:11.742343",
+ "module": null,
+ "name": "Jewellery Invoice-custom_total_taxes_and_charges",
+ "no_copy": 0,
+ "non_negative": 0,
+ "options": "currency",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "print_width": null,
+ "read_only": 1,
+ "read_only_depends_on": null,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "show_dashboard": 0,
+ "sort_options": 0,
+ "translatable": 0,
+ "unique": 0,
+ "width": null
+ },
+ {
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "collapsible_depends_on": null,
+ "columns": 0,
+ "default": null,
+ "depends_on": null,
+ "description": null,
+ "docstatus": 0,
+ "doctype": "Custom Field",
+ "dt": "Department",
+ "fetch_from": null,
+ "fetch_if_empty": 0,
+ "fieldname": "head_of_department",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "hide_border": 0,
+ "hide_days": 0,
+ "hide_seconds": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_preview": 0,
+ "in_standard_filter": 0,
+ "insert_after": "parent_department",
+ "is_system_generated": 0,
+ "is_virtual": 0,
+ "label": "Head of Department",
+ "length": 0,
+ "mandatory_depends_on": null,
+ "modified": "2023-10-20 15:16:08.680216",
+ "module": null,
+ "name": "Department-head_of_department",
+ "no_copy": 0,
+ "non_negative": 0,
+ "options": "Employee",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "print_width": null,
+ "read_only": 0,
+ "read_only_depends_on": null,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "show_dashboard": 0,
+ "sort_options": 0,
+ "translatable": 0,
+ "unique": 0,
+ "width": null
+ },
+ {
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "collapsible_depends_on": null,
+ "columns": 0,
+ "default": null,
+ "depends_on": null,
+ "description": null,
+ "docstatus": 0,
+ "doctype": "Custom Field",
+ "dt": "Purchase Invoice",
+ "fetch_from": null,
+ "fetch_if_empty": 0,
+ "fieldname": "keep_metal_ledger",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "hide_border": 0,
+ "hide_days": 0,
+ "hide_seconds": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_preview": 0,
+ "in_standard_filter": 0,
+ "insert_after": "supplier",
+ "is_system_generated": 0,
+ "is_virtual": 0,
+ "label": "Keep Metal Ledger",
+ "length": 0,
+ "mandatory_depends_on": null,
+ "modified": "2023-01-19 17:11:57.835012",
+ "module": null,
+ "name": "Purchase Invoice-keep_metal_ledger",
+ "no_copy": 0,
+ "non_negative": 0,
+ "options": null,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "print_width": null,
+ "read_only": 0,
+ "read_only_depends_on": null,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "show_dashboard": 0,
+ "sort_options": 0,
+ "translatable": 0,
+ "unique": 0,
+ "width": null
+ },
+ {
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "collapsible_depends_on": null,
+ "columns": 0,
+ "default": null,
+ "depends_on": null,
+ "description": null,
+ "docstatus": 0,
+ "doctype": "Custom Field",
+ "dt": "Item Group",
+ "fetch_from": null,
+ "fetch_if_empty": 0,
+ "fieldname": "is_aumms_item_group",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "hide_border": 0,
+ "hide_days": 0,
+ "hide_seconds": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_preview": 0,
+ "in_standard_filter": 0,
+ "insert_after": "image",
+ "is_system_generated": 0,
+ "is_virtual": 0,
+ "label": "Is AuMMS Item Group",
+ "length": 0,
+ "mandatory_depends_on": null,
+ "modified": "2023-08-10 16:44:07.982502",
+ "module": null,
+ "name": "Item Group-is_aumms_item_group",
+ "no_copy": 0,
+ "non_negative": 0,
+ "options": null,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "print_width": null,
+ "read_only": 1,
+ "read_only_depends_on": null,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "show_dashboard": 0,
+ "sort_options": 0,
+ "translatable": 0,
+ "unique": 0,
+ "width": null
+ },
+ {
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "collapsible_depends_on": null,
+ "columns": 0,
+ "default": null,
+ "depends_on": null,
+ "description": null,
+ "docstatus": 0,
+ "doctype": "Custom Field",
+ "dt": "Job Card",
+ "fetch_from": "work_order.assigned_to",
+ "fetch_if_empty": 0,
+ "fieldname": "assigned_to",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "hide_border": 0,
+ "hide_days": 0,
+ "hide_seconds": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_preview": 0,
+ "in_standard_filter": 0,
+ "insert_after": "employee",
+ "is_system_generated": 0,
+ "is_virtual": 0,
+ "label": "Assigned To",
+ "length": 0,
+ "mandatory_depends_on": null,
+ "modified": "2023-11-15 12:12:19.890413",
+ "module": null,
+ "name": "Job Card-assigned_to",
+ "no_copy": 0,
+ "non_negative": 0,
+ "options": "Smith",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "print_width": null,
+ "read_only": 0,
+ "read_only_depends_on": null,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "show_dashboard": 0,
+ "sort_options": 0,
+ "translatable": 0,
+ "unique": 0,
+ "width": null
+ },
+ {
+ "allow_in_quick_entry": 1,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "collapsible_depends_on": null,
+ "columns": 0,
+ "default": null,
+ "depends_on": "",
+ "description": null,
+ "docstatus": 0,
+ "doctype": "Custom Field",
+ "dt": "Item",
+ "fetch_from": "item_group.item_type",
+ "fetch_if_empty": 1,
+ "fieldname": "item_type",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "hide_border": 0,
+ "hide_days": 0,
+ "hide_seconds": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_preview": 0,
+ "in_standard_filter": 0,
+ "insert_after": "item_group",
+ "is_system_generated": 0,
+ "is_virtual": 0,
+ "label": "Item Type",
+ "length": 0,
+ "mandatory_depends_on": "",
+ "modified": "2023-01-06 16:49:20.501863",
+ "module": null,
+ "name": "Item-item_type",
+ "no_copy": 0,
+ "non_negative": 0,
+ "options": "Item Type",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "print_width": null,
+ "read_only": 0,
+ "read_only_depends_on": null,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "show_dashboard": 0,
+ "sort_options": 0,
+ "translatable": 0,
+ "unique": 0,
+ "width": null
+ },
+ {
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "collapsible_depends_on": null,
+ "columns": 0,
+ "default": null,
+ "depends_on": null,
+ "description": null,
+ "docstatus": 0,
+ "doctype": "Custom Field",
+ "dt": "Job Card",
+ "fetch_from": "assigned_to.employee",
+ "fetch_if_empty": 0,
+ "fieldname": "assigned_employee",
+ "fieldtype": "Link",
+ "hidden": 1,
+ "hide_border": 0,
+ "hide_days": 0,
+ "hide_seconds": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_preview": 0,
+ "in_standard_filter": 0,
+ "insert_after": "assigned_to",
+ "is_system_generated": 0,
+ "is_virtual": 0,
+ "label": "Assigned Employee",
+ "length": 0,
+ "mandatory_depends_on": null,
+ "modified": "2023-11-15 12:32:11.204644",
+ "module": null,
+ "name": "Job Card-assigned_employee",
+ "no_copy": 0,
+ "non_negative": 0,
+ "options": "Employee",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "print_width": null,
+ "read_only": 1,
+ "read_only_depends_on": null,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "show_dashboard": 0,
+ "sort_options": 0,
+ "translatable": 0,
+ "unique": 0,
+ "width": null
+ },
+ {
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "collapsible_depends_on": null,
+ "columns": 0,
+ "default": null,
+ "depends_on": null,
+ "description": null,
+ "docstatus": 0,
+ "doctype": "Custom Field",
+ "dt": "Item Group",
+ "fetch_from": "parent_item_group.item_type",
+ "fetch_if_empty": 1,
+ "fieldname": "item_type",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "hide_border": 0,
+ "hide_days": 0,
+ "hide_seconds": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_preview": 0,
+ "in_standard_filter": 0,
+ "insert_after": "column_break_5",
+ "is_system_generated": 0,
+ "is_virtual": 0,
+ "label": "Item Type",
+ "length": 0,
+ "mandatory_depends_on": null,
+ "modified": "2023-01-05 15:09:57.352372",
+ "module": null,
+ "name": "Item Group-item_type",
+ "no_copy": 0,
+ "non_negative": 0,
+ "options": "Item Type",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "print_width": null,
+ "read_only": 0,
+ "read_only_depends_on": "",
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "show_dashboard": 0,
+ "sort_options": 0,
+ "translatable": 0,
+ "unique": 0,
+ "width": null
+ },
+ {
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "collapsible_depends_on": null,
+ "columns": 0,
+ "default": null,
+ "depends_on": null,
+ "description": null,
+ "docstatus": 0,
+ "doctype": "Custom Field",
+ "dt": "Purchase Receipt",
+ "fetch_from": null,
+ "fetch_if_empty": 0,
+ "fieldname": "party_link",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "hide_border": 0,
+ "hide_days": 0,
+ "hide_seconds": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_preview": 0,
+ "in_standard_filter": 0,
+ "insert_after": "supplier_delivery_note",
+ "is_system_generated": 0,
+ "is_virtual": 0,
+ "label": "Party Link",
+ "length": 0,
+ "mandatory_depends_on": null,
+ "modified": "2023-01-27 16:49:36.956964",
+ "module": null,
+ "name": "Purchase Receipt-party_link",
+ "no_copy": 0,
+ "non_negative": 0,
+ "options": "Party Link",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "print_width": null,
+ "read_only": 1,
+ "read_only_depends_on": null,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "show_dashboard": 0,
+ "sort_options": 0,
+ "translatable": 0,
+ "unique": 0,
+ "width": null
+ },
+ {
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "collapsible_depends_on": null,
+ "columns": 0,
+ "default": null,
+ "depends_on": "eval:doc.is_purity_item",
+ "description": null,
+ "docstatus": 0,
+ "doctype": "Custom Field",
+ "dt": "Item",
+ "fetch_from": "item_group.making_charge_based_on",
+ "fetch_if_empty": 1,
+ "fieldname": "making_charge_based_on",
+ "fieldtype": "Select",
+ "hidden": 0,
+ "hide_border": 0,
+ "hide_days": 0,
+ "hide_seconds": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_preview": 0,
+ "in_standard_filter": 0,
+ "insert_after": "stock_uom",
+ "is_system_generated": 0,
+ "is_virtual": 0,
+ "label": "Making Charge Based On",
+ "length": 0,
+ "mandatory_depends_on": null,
+ "modified": "2023-01-05 17:32:05.643181",
+ "module": null,
+ "name": "Item-making_charge_based_on",
+ "no_copy": 0,
+ "non_negative": 0,
+ "options": "\nFixed\nPercentage",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "print_width": null,
+ "read_only": 0,
+ "read_only_depends_on": null,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "show_dashboard": 0,
+ "sort_options": 0,
+ "translatable": 1,
+ "unique": 0,
+ "width": null
+ },
+ {
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "collapsible_depends_on": null,
+ "columns": 0,
+ "default": null,
+ "depends_on": null,
+ "description": null,
+ "docstatus": 0,
+ "doctype": "Custom Field",
+ "dt": "Employee",
+ "fetch_from": null,
+ "fetch_if_empty": 0,
+ "fieldname": "custom_warehouse",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "hide_border": 0,
+ "hide_days": 0,
+ "hide_seconds": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_preview": 0,
+ "in_standard_filter": 0,
+ "insert_after": "employee_name",
+ "is_system_generated": 0,
+ "is_virtual": 0,
+ "label": "Warehouse",
+ "length": 0,
+ "mandatory_depends_on": null,
+ "modified": "2024-04-29 14:36:36.781226",
+ "module": null,
+ "name": "Employee-custom_warehouse",
+ "no_copy": 0,
+ "non_negative": 0,
+ "options": "Warehouse",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "print_width": null,
+ "read_only": 0,
+ "read_only_depends_on": null,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "show_dashboard": 0,
+ "sort_options": 0,
+ "translatable": 0,
+ "unique": 0,
+ "width": null
+ },
+ {
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "collapsible_depends_on": null,
+ "columns": 0,
+ "default": null,
+ "depends_on": "",
+ "description": null,
+ "docstatus": 0,
+ "doctype": "Custom Field",
+ "dt": "Item Group",
+ "fetch_from": "item_type.is_purity_item",
+ "fetch_if_empty": 0,
+ "fieldname": "is_purity_item",
+ "fieldtype": "Check",
+ "hidden": 1,
+ "hide_border": 0,
+ "hide_days": 0,
+ "hide_seconds": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_preview": 0,
+ "in_standard_filter": 0,
+ "insert_after": "item_type",
+ "is_system_generated": 0,
+ "is_virtual": 0,
+ "label": "Is Purity Item",
+ "length": 0,
+ "mandatory_depends_on": null,
+ "modified": "2023-01-31 12:41:20.505617",
+ "module": null,
+ "name": "Item Group-is_purity_item",
+ "no_copy": 0,
+ "non_negative": 0,
+ "options": null,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "print_width": null,
+ "read_only": 1,
+ "read_only_depends_on": null,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "show_dashboard": 0,
+ "sort_options": 0,
+ "translatable": 0,
+ "unique": 0,
+ "width": null
+ },
+ {
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "collapsible_depends_on": null,
+ "columns": 0,
+ "default": null,
+ "depends_on": "eval: doc.is_purity_item",
+ "description": null,
+ "docstatus": 0,
+ "doctype": "Custom Field",
+ "dt": "Item Group",
+ "fetch_from": null,
+ "fetch_if_empty": 0,
+ "fieldname": "making_charge_based_on",
+ "fieldtype": "Select",
+ "hidden": 0,
+ "hide_border": 0,
+ "hide_days": 0,
+ "hide_seconds": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_preview": 0,
+ "in_standard_filter": 0,
+ "insert_after": "is_purity_item",
+ "is_system_generated": 0,
+ "is_virtual": 0,
+ "label": "Making Charge Based On",
+ "length": 0,
+ "mandatory_depends_on": null,
+ "modified": "2023-01-05 10:54:18.536026",
+ "module": null,
+ "name": "Item Group-making_charge_based_on",
+ "no_copy": 0,
+ "non_negative": 0,
+ "options": "\nFixed\nPercentage",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "print_width": null,
+ "read_only": 0,
+ "read_only_depends_on": null,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "show_dashboard": 0,
+ "sort_options": 0,
+ "translatable": 0,
+ "unique": 0,
+ "width": null
+ },
+ {
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "collapsible_depends_on": null,
+ "columns": 0,
+ "default": null,
+ "depends_on": "eval: doc.making_charge_based_on == 'Percentage' && doc.is_purity_item",
+ "description": null,
+ "docstatus": 0,
+ "doctype": "Custom Field",
+ "dt": "Item",
+ "fetch_from": "item_group.percentage",
+ "fetch_if_empty": 1,
+ "fieldname": "making_charge_percentage",
+ "fieldtype": "Percent",
+ "hidden": 0,
+ "hide_border": 0,
+ "hide_days": 0,
+ "hide_seconds": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_preview": 0,
+ "in_standard_filter": 0,
+ "insert_after": "making_charge_based_on",
+ "is_system_generated": 0,
+ "is_virtual": 0,
+ "label": "Making Charge Percentage",
+ "length": 0,
+ "mandatory_depends_on": "eval: doc.making_charge_based_on == 'Percentage'",
+ "modified": "2023-01-05 15:09:29.804481",
+ "module": null,
+ "name": "Item-making_charge_percentage",
+ "no_copy": 0,
+ "non_negative": 0,
+ "options": null,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "print_width": null,
+ "read_only": 0,
+ "read_only_depends_on": null,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "show_dashboard": 0,
+ "sort_options": 0,
+ "translatable": 0,
+ "unique": 0,
+ "width": null
+ },
+ {
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "collapsible_depends_on": null,
+ "columns": 0,
+ "default": null,
+ "depends_on": "eval: doc.making_charge_based_on == 'Percentage'",
+ "description": null,
+ "docstatus": 0,
+ "doctype": "Custom Field",
+ "dt": "Item Group",
+ "fetch_from": null,
+ "fetch_if_empty": 0,
+ "fieldname": "percentage",
+ "fieldtype": "Percent",
+ "hidden": 0,
+ "hide_border": 0,
+ "hide_days": 0,
+ "hide_seconds": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_preview": 0,
+ "in_standard_filter": 0,
+ "insert_after": "making_charge_based_on",
+ "is_system_generated": 0,
+ "is_virtual": 0,
+ "label": "Percentage",
+ "length": 0,
+ "mandatory_depends_on": "eval: doc.making_charge_based_on == 'Percentage'",
+ "modified": "2023-01-05 11:41:02.132844",
+ "module": null,
+ "name": "Item Group-percentage",
+ "no_copy": 0,
+ "non_negative": 0,
+ "options": null,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "print_width": null,
+ "read_only": 0,
+ "read_only_depends_on": null,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "show_dashboard": 0,
+ "sort_options": 0,
+ "translatable": 0,
+ "unique": 0,
+ "width": null
+ },
+ {
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "collapsible_depends_on": null,
+ "columns": 0,
+ "default": null,
+ "depends_on": "eval: doc.making_charge_based_on == 'Fixed' && doc.is_purity_item",
+ "description": null,
+ "docstatus": 0,
+ "doctype": "Custom Field",
+ "dt": "Item",
+ "fetch_from": "item_group.currency",
+ "fetch_if_empty": 1,
+ "fieldname": "making_charge",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "hide_border": 0,
+ "hide_days": 0,
+ "hide_seconds": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_preview": 0,
+ "in_standard_filter": 0,
+ "insert_after": "making_charge_percentage",
+ "is_system_generated": 0,
+ "is_virtual": 0,
+ "label": "Making Charge",
+ "length": 0,
+ "mandatory_depends_on": "eval: doc.making_charge_based_on == 'Fixed'",
+ "modified": "2023-01-06 11:28:22.995811",
+ "module": null,
+ "name": "Item-making_charge",
+ "no_copy": 0,
+ "non_negative": 0,
+ "options": null,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "print_width": null,
+ "read_only": 0,
+ "read_only_depends_on": null,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "show_dashboard": 0,
+ "sort_options": 0,
+ "translatable": 0,
+ "unique": 0,
+ "width": null
+ },
+ {
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "collapsible_depends_on": null,
+ "columns": 0,
+ "default": null,
+ "depends_on": "eval: doc.making_charge_based_on == 'Fixed'",
+ "description": null,
+ "docstatus": 0,
+ "doctype": "Custom Field",
+ "dt": "Item Group",
+ "fetch_from": null,
+ "fetch_if_empty": 0,
+ "fieldname": "currency",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "hide_border": 0,
+ "hide_days": 0,
+ "hide_seconds": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_preview": 0,
+ "in_standard_filter": 0,
+ "insert_after": "percentage",
+ "is_system_generated": 0,
+ "is_virtual": 0,
+ "label": "Currency",
+ "length": 0,
+ "mandatory_depends_on": "eval: doc.making_charge_based_on == 'Fixed'",
+ "modified": "2023-01-05 12:43:08.976116",
+ "module": null,
+ "name": "Item Group-currency",
+ "no_copy": 0,
+ "non_negative": 0,
+ "options": null,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "print_width": null,
+ "read_only": 0,
+ "read_only_depends_on": null,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "show_dashboard": 0,
+ "sort_options": 0,
+ "translatable": 0,
+ "unique": 0,
+ "width": null
+ },
+ {
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "collapsible_depends_on": null,
+ "columns": 0,
+ "default": null,
+ "depends_on": null,
+ "description": null,
+ "docstatus": 0,
+ "doctype": "Custom Field",
+ "dt": "Item Group",
+ "fetch_from": null,
+ "fetch_if_empty": 0,
+ "fieldname": "is_sales_item",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "hide_border": 0,
+ "hide_days": 0,
+ "hide_seconds": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_preview": 0,
+ "in_standard_filter": 0,
+ "insert_after": "currency",
+ "is_system_generated": 0,
+ "is_virtual": 0,
+ "label": "Is Sales Item",
+ "length": 0,
+ "mandatory_depends_on": null,
+ "modified": "2023-01-11 15:57:23.780415",
+ "module": null,
+ "name": "Item Group-is_sales_item",
+ "no_copy": 0,
+ "non_negative": 0,
+ "options": null,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "print_width": null,
+ "read_only": 0,
+ "read_only_depends_on": null,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "show_dashboard": 0,
+ "sort_options": 0,
+ "translatable": 0,
+ "unique": 0,
+ "width": null
+ },
+ {
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "collapsible_depends_on": null,
+ "columns": 0,
+ "default": null,
+ "depends_on": null,
+ "description": null,
+ "docstatus": 0,
+ "doctype": "Custom Field",
+ "dt": "Purchase Receipt",
+ "fetch_from": null,
+ "fetch_if_empty": 0,
+ "fieldname": "keep_metal_ledger",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "hide_border": 0,
+ "hide_days": 0,
+ "hide_seconds": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_preview": 0,
+ "in_standard_filter": 0,
+ "insert_after": "set_posting_time",
+ "is_system_generated": 0,
+ "is_virtual": 0,
+ "label": "Keep Metal Ledger",
+ "length": 0,
+ "mandatory_depends_on": null,
+ "modified": "2023-01-19 16:51:12.721967",
+ "module": null,
+ "name": "Purchase Receipt-keep_metal_ledger",
+ "no_copy": 0,
+ "non_negative": 0,
+ "options": null,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "print_width": null,
+ "read_only": 0,
+ "read_only_depends_on": null,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "show_dashboard": 0,
+ "sort_options": 0,
+ "translatable": 0,
+ "unique": 0,
+ "width": null
+ },
+ {
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "collapsible_depends_on": null,
+ "columns": 0,
+ "default": null,
+ "depends_on": null,
+ "description": null,
+ "docstatus": 0,
+ "doctype": "Custom Field",
+ "dt": "Item Group",
+ "fetch_from": null,
+ "fetch_if_empty": 0,
+ "fieldname": "is_purchase_item",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "hide_border": 0,
+ "hide_days": 0,
+ "hide_seconds": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_preview": 0,
+ "in_standard_filter": 0,
+ "insert_after": "is_sales_item",
+ "is_system_generated": 0,
+ "is_virtual": 0,
+ "label": "Is Purchase Item",
+ "length": 0,
+ "mandatory_depends_on": null,
+ "modified": "2023-01-11 15:57:25.254765",
+ "module": null,
+ "name": "Item Group-is_purchase_item",
+ "no_copy": 0,
+ "non_negative": 0,
+ "options": null,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "print_width": null,
+ "read_only": 0,
+ "read_only_depends_on": null,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "show_dashboard": 0,
+ "sort_options": 0,
+ "translatable": 0,
+ "unique": 0,
+ "width": null
+ },
+ {
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "collapsible_depends_on": null,
+ "columns": 0,
+ "default": null,
+ "depends_on": "eval:doc.is_purity_item",
+ "description": null,
+ "docstatus": 0,
+ "doctype": "Custom Field",
+ "dt": "Item",
+ "fetch_from": "purity.purity_percentage",
+ "fetch_if_empty": 0,
+ "fieldname": "purity_percentage",
+ "fieldtype": "Percent",
+ "hidden": 0,
+ "hide_border": 0,
+ "hide_days": 0,
+ "hide_seconds": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_preview": 0,
+ "in_standard_filter": 0,
+ "insert_after": "purity",
+ "is_system_generated": 0,
+ "is_virtual": 0,
+ "label": "Purity Percentage",
+ "length": 0,
+ "mandatory_depends_on": null,
+ "modified": "2023-01-06 14:48:46.579229",
+ "module": null,
+ "name": "Item-purity_percentage",
+ "no_copy": 0,
+ "non_negative": 0,
+ "options": null,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "print_width": null,
+ "read_only": 1,
+ "read_only_depends_on": null,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "show_dashboard": 0,
+ "sort_options": 0,
+ "translatable": 0,
+ "unique": 0,
+ "width": null
+ },
+ {
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "collapsible_depends_on": null,
+ "columns": 0,
+ "default": null,
+ "depends_on": null,
+ "description": null,
+ "docstatus": 0,
+ "doctype": "Custom Field",
+ "dt": "Purchase Receipt",
+ "fetch_from": null,
+ "fetch_if_empty": 0,
+ "fieldname": "create_invoice_on_submit",
+ "fieldtype": "Check",
+ "hidden": 1,
+ "hide_border": 0,
+ "hide_days": 0,
+ "hide_seconds": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_preview": 0,
+ "in_standard_filter": 0,
+ "insert_after": "keep_metal_ledger",
+ "is_system_generated": 0,
+ "is_virtual": 0,
+ "label": "Create Invoice on Submit",
+ "length": 0,
+ "mandatory_depends_on": null,
+ "modified": "2023-08-23 15:44:29.173542",
+ "module": null,
+ "name": "Purchase Receipt-create_invoice_on_submit",
+ "no_copy": 0,
+ "non_negative": 0,
+ "options": null,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "print_width": null,
+ "read_only": 1,
+ "read_only_depends_on": null,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "show_dashboard": 0,
+ "sort_options": 0,
+ "translatable": 0,
+ "unique": 0,
+ "width": null
+ },
+ {
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "collapsible_depends_on": null,
+ "columns": 0,
+ "default": null,
+ "depends_on": null,
+ "description": null,
+ "docstatus": 0,
+ "doctype": "Custom Field",
+ "dt": "Work Order",
+ "fetch_from": null,
+ "fetch_if_empty": 0,
+ "fieldname": "assigned_to",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "hide_border": 0,
+ "hide_days": 0,
+ "hide_seconds": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_preview": 0,
+ "in_standard_filter": 0,
+ "insert_after": "project",
+ "is_system_generated": 0,
+ "is_virtual": 0,
+ "label": "Assigned To",
+ "length": 0,
+ "mandatory_depends_on": null,
+ "modified": "2023-11-14 12:22:34.239256",
+ "module": null,
+ "name": "Work Order-assigned_to",
+ "no_copy": 0,
+ "non_negative": 0,
+ "options": "Smith",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "print_width": null,
+ "read_only": 0,
+ "read_only_depends_on": null,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "show_dashboard": 0,
+ "sort_options": 0,
+ "translatable": 0,
+ "unique": 0,
+ "width": null
+ },
+ {
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "collapsible_depends_on": null,
+ "columns": 0,
+ "default": null,
+ "depends_on": null,
+ "description": null,
+ "docstatus": 0,
+ "doctype": "Custom Field",
+ "dt": "Purchase Invoice Item",
+ "fetch_from": "item_code.item_type",
+ "fetch_if_empty": 0,
+ "fieldname": "item_type",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "hide_border": 0,
+ "hide_days": 0,
+ "hide_seconds": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_preview": 0,
+ "in_standard_filter": 0,
+ "insert_after": "rejected_qty",
+ "is_system_generated": 0,
+ "is_virtual": 0,
+ "label": "Item Type",
+ "length": 0,
+ "mandatory_depends_on": null,
+ "modified": "2023-01-11 12:31:08.595209",
+ "module": null,
+ "name": "Purchase Invoice Item-item_type",
+ "no_copy": 0,
+ "non_negative": 0,
+ "options": "Item Type",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "print_width": null,
+ "read_only": 0,
+ "read_only_depends_on": null,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "show_dashboard": 0,
+ "sort_options": 0,
+ "translatable": 0,
+ "unique": 0,
+ "width": null
+ },
+ {
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "collapsible_depends_on": null,
+ "columns": 0,
+ "default": null,
+ "depends_on": null,
+ "description": null,
+ "docstatus": 0,
+ "doctype": "Custom Field",
+ "dt": "Work Order",
+ "fetch_from": "assigned_to.smith_name",
+ "fetch_if_empty": 1,
+ "fieldname": "smith_name",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "hide_border": 0,
+ "hide_days": 0,
+ "hide_seconds": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_preview": 0,
+ "in_standard_filter": 0,
+ "insert_after": "assigned_to",
+ "is_system_generated": 0,
+ "is_virtual": 0,
+ "label": "Smith Name",
+ "length": 0,
+ "mandatory_depends_on": null,
+ "modified": "2023-11-14 12:48:04.270472",
+ "module": null,
+ "name": "Work Order-smith_name",
+ "no_copy": 0,
+ "non_negative": 0,
+ "options": null,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "print_width": null,
+ "read_only": 0,
+ "read_only_depends_on": null,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "show_dashboard": 0,
+ "sort_options": 0,
+ "translatable": 0,
+ "unique": 0,
+ "width": null
+ },
+ {
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "collapsible_depends_on": null,
+ "columns": 0,
+ "default": null,
+ "depends_on": null,
+ "description": null,
+ "docstatus": 0,
+ "doctype": "Custom Field",
+ "dt": "Item",
+ "fetch_from": null,
+ "fetch_if_empty": 0,
+ "fieldname": "is_aumms_item",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "hide_border": 0,
+ "hide_days": 0,
+ "hide_seconds": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_preview": 0,
+ "in_standard_filter": 0,
+ "insert_after": "disabled",
+ "is_system_generated": 0,
+ "is_virtual": 0,
+ "label": "Is AuMMS Item",
+ "length": 0,
+ "mandatory_depends_on": null,
+ "modified": "2023-08-10 16:32:46.294462",
+ "module": null,
+ "name": "Item-is_aumms_item",
+ "no_copy": 0,
+ "non_negative": 0,
+ "options": null,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "print_width": null,
+ "read_only": 1,
+ "read_only_depends_on": null,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "show_dashboard": 0,
+ "sort_options": 0,
+ "translatable": 0,
+ "unique": 0,
+ "width": null
+ },
+ {
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "collapsible_depends_on": null,
+ "columns": 0,
+ "default": null,
+ "depends_on": null,
+ "description": null,
+ "docstatus": 0,
+ "doctype": "Custom Field",
+ "dt": "Item",
+ "fetch_from": null,
+ "fetch_if_empty": 0,
+ "fieldname": "custom_is_raw_material",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "hide_border": 0,
+ "hide_days": 0,
+ "hide_seconds": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_preview": 0,
+ "in_standard_filter": 0,
+ "insert_after": "is_aumms_item",
+ "is_system_generated": 0,
+ "is_virtual": 0,
+ "label": "Is Raw Material",
+ "length": 0,
+ "mandatory_depends_on": null,
+ "modified": "2024-03-20 12:16:05.286660",
+ "module": null,
+ "name": "Item-custom_is_raw_material",
+ "no_copy": 0,
+ "non_negative": 0,
+ "options": null,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "print_width": null,
+ "read_only": 0,
+ "read_only_depends_on": null,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "show_dashboard": 0,
+ "sort_options": 0,
+ "translatable": 0,
+ "unique": 0,
+ "width": null
+ },
+ {
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "collapsible_depends_on": null,
+ "columns": 0,
+ "default": null,
+ "depends_on": null,
+ "description": null,
+ "docstatus": 0,
+ "doctype": "Custom Field",
+ "dt": "Sales Order",
+ "fetch_from": null,
+ "fetch_if_empty": 0,
+ "fieldname": "keep_metal_ledger",
+ "fieldtype": "Check",
+ "hidden": 1,
+ "hide_border": 0,
+ "hide_days": 0,
+ "hide_seconds": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_preview": 0,
+ "in_standard_filter": 0,
+ "insert_after": "amended_from",
+ "is_system_generated": 0,
+ "is_virtual": 0,
+ "label": "Keep Metal Ledger",
+ "length": 0,
+ "mandatory_depends_on": null,
+ "modified": "2023-08-23 15:14:10.150999",
+ "module": null,
+ "name": "Sales Order-keep_metal_ledger",
+ "no_copy": 0,
+ "non_negative": 0,
+ "options": null,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "print_width": null,
+ "read_only": 1,
+ "read_only_depends_on": null,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "show_dashboard": 0,
+ "sort_options": 0,
+ "translatable": 0,
+ "unique": 0,
+ "width": null
+ },
+ {
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "collapsible_depends_on": null,
+ "columns": 0,
+ "default": null,
+ "depends_on": null,
+ "description": null,
+ "docstatus": 0,
+ "doctype": "Custom Field",
+ "dt": "Jewellery Invoice",
+ "fetch_from": null,
+ "fetch_if_empty": 0,
+ "fieldname": "custom_taxes_and_charges",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "hide_border": 0,
+ "hide_days": 0,
+ "hide_seconds": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_preview": 0,
+ "in_standard_filter": 0,
+ "insert_after": "total_gold_amount",
+ "is_system_generated": 0,
+ "is_virtual": 0,
+ "label": "Taxes and Charges",
+ "length": 0,
+ "mandatory_depends_on": null,
+ "modified": "2024-02-07 22:15:10.690293",
+ "module": null,
+ "name": "Jewellery Invoice-custom_taxes_and_charges",
+ "no_copy": 0,
+ "non_negative": 0,
+ "options": null,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "print_width": null,
+ "read_only": 0,
+ "read_only_depends_on": null,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "show_dashboard": 0,
+ "sort_options": 0,
+ "translatable": 0,
+ "unique": 0,
+ "width": null
+ },
+ {
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "collapsible_depends_on": null,
+ "columns": 0,
+ "default": null,
+ "depends_on": null,
+ "description": null,
+ "docstatus": 0,
+ "doctype": "Custom Field",
+ "dt": "Sales Invoice",
+ "fetch_from": null,
+ "fetch_if_empty": 0,
+ "fieldname": "keep_metal_ledger",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "hide_border": 0,
+ "hide_days": 0,
+ "hide_seconds": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_preview": 0,
+ "in_standard_filter": 0,
+ "insert_after": "is_debit_note",
+ "is_system_generated": 0,
+ "is_virtual": 0,
+ "label": "Keep Metal Ledger",
+ "length": 0,
+ "mandatory_depends_on": null,
+ "modified": "2023-01-19 15:29:50.710586",
+ "module": null,
+ "name": "Sales Invoice-keep_metal_ledger",
+ "no_copy": 0,
+ "non_negative": 0,
+ "options": null,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "print_width": null,
+ "read_only": 0,
+ "read_only_depends_on": null,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "show_dashboard": 0,
+ "sort_options": 0,
+ "translatable": 0,
+ "unique": 0,
+ "width": null
+ },
+ {
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "collapsible_depends_on": null,
+ "columns": 0,
+ "default": null,
+ "depends_on": null,
+ "description": null,
+ "docstatus": 0,
+ "doctype": "Custom Field",
+ "dt": "Jewellery Invoice",
+ "fetch_from": null,
+ "fetch_if_empty": 0,
+ "fieldname": "custom_sales_taxes_and_charges",
+ "fieldtype": "Table",
+ "hidden": 0,
+ "hide_border": 0,
+ "hide_days": 0,
+ "hide_seconds": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_preview": 0,
+ "in_standard_filter": 0,
+ "insert_after": "sales_taxes_and_charges_template",
+ "is_system_generated": 0,
+ "is_virtual": 0,
+ "label": "Sales Taxes and Charges",
+ "length": 0,
+ "mandatory_depends_on": null,
+ "modified": "2024-02-07 22:15:11.034978",
+ "module": null,
+ "name": "Jewellery Invoice-custom_sales_taxes_and_charges",
+ "no_copy": 0,
+ "non_negative": 0,
+ "options": "Sales Taxes and Charges",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "print_width": null,
+ "read_only": 0,
+ "read_only_depends_on": null,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "show_dashboard": 0,
+ "sort_options": 0,
+ "translatable": 0,
+ "unique": 0,
+ "width": null
+ },
+ {
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "collapsible_depends_on": null,
+ "columns": 0,
+ "default": null,
+ "depends_on": null,
+ "description": null,
+ "docstatus": 0,
+ "doctype": "Custom Field",
+ "dt": "Item",
+ "fetch_from": null,
+ "fetch_if_empty": 0,
+ "fieldname": "custom_item_qr_code",
+ "fieldtype": "Image",
+ "hidden": 0,
+ "hide_border": 0,
+ "hide_days": 0,
+ "hide_seconds": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_preview": 0,
+ "in_standard_filter": 0,
+ "insert_after": "item_qr",
+ "is_system_generated": 0,
+ "is_virtual": 0,
+ "label": "Item QR Code",
+ "length": 0,
+ "mandatory_depends_on": null,
+ "modified": "2024-02-15 12:27:24.365547",
+ "module": null,
+ "name": "Item-custom_item_qr_code",
+ "no_copy": 0,
+ "non_negative": 0,
+ "options": "item_qr",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "print_width": null,
+ "read_only": 0,
+ "read_only_depends_on": null,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "show_dashboard": 0,
+ "sort_options": 0,
+ "translatable": 0,
+ "unique": 0,
+ "width": null
+ },
+ {
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "collapsible_depends_on": null,
+ "columns": 0,
+ "default": "0",
+ "depends_on": "",
+ "description": null,
+ "docstatus": 0,
+ "doctype": "Custom Field",
+ "dt": "Item",
+ "fetch_from": null,
+ "fetch_if_empty": 0,
+ "fieldname": "gold_weight",
+ "fieldtype": "Float",
+ "hidden": 0,
+ "hide_border": 0,
+ "hide_days": 0,
+ "hide_seconds": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_preview": 0,
+ "in_standard_filter": 0,
+ "insert_after": "warranty_period",
+ "is_system_generated": 0,
+ "is_virtual": 0,
+ "label": "Gold Weight",
+ "length": 0,
+ "mandatory_depends_on": "",
+ "modified": "2023-08-10 16:25:51.557590",
+ "module": null,
+ "name": "Item-gold_weight",
+ "no_copy": 0,
+ "non_negative": 0,
+ "options": null,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "print_width": null,
+ "read_only": 0,
+ "read_only_depends_on": null,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "show_dashboard": 0,
+ "sort_options": 0,
+ "translatable": 0,
+ "unique": 0,
+ "width": null
+ },
+ {
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "collapsible_depends_on": null,
+ "columns": 0,
+ "default": null,
+ "depends_on": "",
+ "description": null,
+ "docstatus": 0,
+ "doctype": "Custom Field",
+ "dt": "Item",
+ "fetch_from": null,
+ "fetch_if_empty": 0,
+ "fieldname": "has_stone",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "hide_border": 0,
+ "hide_days": 0,
+ "hide_seconds": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_preview": 0,
+ "in_standard_filter": 0,
+ "insert_after": "weight_uom",
+ "is_system_generated": 0,
+ "is_virtual": 0,
+ "label": "Has Stone",
+ "length": 0,
+ "mandatory_depends_on": null,
+ "modified": "2023-08-10 16:19:51.484765",
+ "module": null,
+ "name": "Item-has_stone",
+ "no_copy": 0,
+ "non_negative": 0,
+ "options": null,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "print_width": null,
+ "read_only": 0,
+ "read_only_depends_on": null,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "show_dashboard": 0,
+ "sort_options": 0,
+ "translatable": 0,
+ "unique": 0,
+ "width": null
+ },
+ {
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "collapsible_depends_on": null,
+ "columns": 0,
+ "default": "0",
+ "depends_on": "has_stone",
+ "description": null,
+ "docstatus": 0,
+ "doctype": "Custom Field",
+ "dt": "Item",
+ "fetch_from": null,
+ "fetch_if_empty": 0,
+ "fieldname": "stone_charge",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "hide_border": 0,
+ "hide_days": 0,
+ "hide_seconds": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_preview": 0,
+ "in_standard_filter": 0,
+ "insert_after": "stone_weight",
+ "is_system_generated": 0,
+ "is_virtual": 0,
+ "label": "Stone Charge",
+ "length": 0,
+ "mandatory_depends_on": null,
+ "modified": "2023-08-10 16:22:43.694341",
+ "module": null,
+ "name": "Item-stone_charge",
+ "no_copy": 0,
+ "non_negative": 0,
+ "options": null,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "print_width": null,
+ "read_only": 0,
+ "read_only_depends_on": null,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "show_dashboard": 0,
+ "sort_options": 0,
+ "translatable": 0,
+ "unique": 0,
+ "width": null
+ }
+ ]
\ No newline at end of file
diff --git a/aumms/fixtures/designation.json b/aumms/fixtures/designation.json
index 532921ca..ff4d501c 100644
--- a/aumms/fixtures/designation.json
+++ b/aumms/fixtures/designation.json
@@ -1,10 +1,10 @@
[
- {
- "description": null,
- "designation_name": "Smith",
- "docstatus": 0,
- "doctype": "Designation",
- "modified": "2023-11-09 16:31:17.044970",
- "name": "Smith"
- }
-]
\ No newline at end of file
+ {
+ "description": null,
+ "designation_name": "Smith",
+ "docstatus": 0,
+ "doctype": "Designation",
+ "modified": "2023-11-09 16:31:17.044970",
+ "name": "Smith"
+ }
+ ]
\ No newline at end of file
diff --git a/aumms/fixtures/role.json b/aumms/fixtures/role.json
index a3be40d6..1d993205 100644
--- a/aumms/fixtures/role.json
+++ b/aumms/fixtures/role.json
@@ -1,149 +1,149 @@
[
- {
- "bulk_actions": 1,
- "dashboard": 1,
- "desk_access": 1,
- "disabled": 0,
- "docstatus": 0,
- "doctype": "Role",
- "form_sidebar": 1,
- "home_page": null,
- "is_custom": 0,
- "list_sidebar": 1,
- "modified": "2024-05-07 11:57:06.425584",
- "name": "Sales Manager",
- "notifications": 1,
- "restrict_to_domain": null,
- "role_name": "Sales Manager",
- "search_bar": 1,
- "timeline": 1,
- "two_factor_auth": 0,
- "view_switcher": 1
- },
- {
- "bulk_actions": 1,
- "dashboard": 1,
- "desk_access": 1,
- "disabled": 0,
- "docstatus": 0,
- "doctype": "Role",
- "form_sidebar": 1,
- "home_page": null,
- "is_custom": 0,
- "list_sidebar": 1,
- "modified": "2024-05-03 16:59:21.456754",
- "name": "Sales Officer",
- "notifications": 1,
- "restrict_to_domain": null,
- "role_name": "Sales Officer",
- "search_bar": 1,
- "timeline": 1,
- "two_factor_auth": 0,
- "view_switcher": 1
- },
- {
- "bulk_actions": 1,
- "dashboard": 1,
- "desk_access": 1,
- "disabled": 0,
- "docstatus": 0,
- "doctype": "Role",
- "form_sidebar": 1,
- "home_page": null,
- "is_custom": 0,
- "list_sidebar": 1,
- "modified": "2023-08-09 11:52:51.350016",
- "name": "Supervisor",
- "notifications": 1,
- "restrict_to_domain": null,
- "role_name": "Supervisor",
- "search_bar": 1,
- "timeline": 1,
- "two_factor_auth": 0,
- "view_switcher": 1
- },
- {
- "bulk_actions": 1,
- "dashboard": 1,
- "desk_access": 1,
- "disabled": 0,
- "docstatus": 0,
- "doctype": "Role",
- "form_sidebar": 1,
- "home_page": null,
- "is_custom": 0,
- "list_sidebar": 1,
- "modified": "2023-08-09 12:56:39.398103",
- "name": "Design Analyst",
- "notifications": 1,
- "restrict_to_domain": null,
- "role_name": "Design Analyst",
- "search_bar": 1,
- "timeline": 1,
- "two_factor_auth": 0,
- "view_switcher": 1
- },
- {
- "bulk_actions": 1,
- "dashboard": 1,
- "desk_access": 1,
- "disabled": 0,
- "docstatus": 0,
- "doctype": "Role",
- "form_sidebar": 1,
- "home_page": null,
- "is_custom": 0,
- "list_sidebar": 1,
- "modified": "2023-10-18 15:34:02.128307",
- "name": "Head of Smith",
- "notifications": 1,
- "restrict_to_domain": null,
- "role_name": "Head of Smith",
- "search_bar": 1,
- "timeline": 1,
- "two_factor_auth": 0,
- "view_switcher": 1
- },
- {
- "bulk_actions": 1,
- "dashboard": 1,
- "desk_access": 1,
- "disabled": 0,
- "docstatus": 0,
- "doctype": "Role",
- "form_sidebar": 1,
- "home_page": null,
- "is_custom": 0,
- "list_sidebar": 1,
- "modified": "2023-10-18 16:03:05.894641",
- "name": "Smith",
- "notifications": 1,
- "restrict_to_domain": null,
- "role_name": "Smith",
- "search_bar": 1,
- "timeline": 1,
- "two_factor_auth": 0,
- "view_switcher": 1
- },
- {
- "bulk_actions": 1,
- "dashboard": 1,
- "desk_access": 1,
- "disabled": 0,
- "docstatus": 0,
- "doctype": "Role",
- "form_sidebar": 1,
- "home_page": null,
- "is_custom": 0,
- "list_sidebar": 1,
- "modified": "2024-02-01 12:22:37.829708",
- "name": "AuMMS Manager",
- "notifications": 1,
- "restrict_to_domain": null,
- "role_name": "AuMMS Manager",
- "search_bar": 1,
- "timeline": 1,
- "two_factor_auth": 0,
- "view_switcher": 1
- }
-]
\ No newline at end of file
+ {
+ "bulk_actions": 1,
+ "dashboard": 1,
+ "desk_access": 1,
+ "disabled": 0,
+ "docstatus": 0,
+ "doctype": "Role",
+ "form_sidebar": 1,
+ "home_page": null,
+ "is_custom": 0,
+ "list_sidebar": 1,
+ "modified": "2024-05-07 11:57:06.425584",
+ "name": "Sales Manager",
+ "notifications": 1,
+ "restrict_to_domain": null,
+ "role_name": "Sales Manager",
+ "search_bar": 1,
+ "timeline": 1,
+ "two_factor_auth": 0,
+ "view_switcher": 1
+ },
+ {
+ "bulk_actions": 1,
+ "dashboard": 1,
+ "desk_access": 1,
+ "disabled": 0,
+ "docstatus": 0,
+ "doctype": "Role",
+ "form_sidebar": 1,
+ "home_page": null,
+ "is_custom": 0,
+ "list_sidebar": 1,
+ "modified": "2024-05-03 16:59:21.456754",
+ "name": "Sales Officer",
+ "notifications": 1,
+ "restrict_to_domain": null,
+ "role_name": "Sales Officer",
+ "search_bar": 1,
+ "timeline": 1,
+ "two_factor_auth": 0,
+ "view_switcher": 1
+ },
+ {
+ "bulk_actions": 1,
+ "dashboard": 1,
+ "desk_access": 1,
+ "disabled": 0,
+ "docstatus": 0,
+ "doctype": "Role",
+ "form_sidebar": 1,
+ "home_page": null,
+ "is_custom": 0,
+ "list_sidebar": 1,
+ "modified": "2023-08-09 11:52:51.350016",
+ "name": "Supervisor",
+ "notifications": 1,
+ "restrict_to_domain": null,
+ "role_name": "Supervisor",
+ "search_bar": 1,
+ "timeline": 1,
+ "two_factor_auth": 0,
+ "view_switcher": 1
+ },
+ {
+ "bulk_actions": 1,
+ "dashboard": 1,
+ "desk_access": 1,
+ "disabled": 0,
+ "docstatus": 0,
+ "doctype": "Role",
+ "form_sidebar": 1,
+ "home_page": null,
+ "is_custom": 0,
+ "list_sidebar": 1,
+ "modified": "2023-08-09 12:56:39.398103",
+ "name": "Design Analyst",
+ "notifications": 1,
+ "restrict_to_domain": null,
+ "role_name": "Design Analyst",
+ "search_bar": 1,
+ "timeline": 1,
+ "two_factor_auth": 0,
+ "view_switcher": 1
+ },
+ {
+ "bulk_actions": 1,
+ "dashboard": 1,
+ "desk_access": 1,
+ "disabled": 0,
+ "docstatus": 0,
+ "doctype": "Role",
+ "form_sidebar": 1,
+ "home_page": null,
+ "is_custom": 0,
+ "list_sidebar": 1,
+ "modified": "2023-10-18 15:34:02.128307",
+ "name": "Head of Smith",
+ "notifications": 1,
+ "restrict_to_domain": null,
+ "role_name": "Head of Smith",
+ "search_bar": 1,
+ "timeline": 1,
+ "two_factor_auth": 0,
+ "view_switcher": 1
+ },
+ {
+ "bulk_actions": 1,
+ "dashboard": 1,
+ "desk_access": 1,
+ "disabled": 0,
+ "docstatus": 0,
+ "doctype": "Role",
+ "form_sidebar": 1,
+ "home_page": null,
+ "is_custom": 0,
+ "list_sidebar": 1,
+ "modified": "2023-10-18 16:03:05.894641",
+ "name": "Smith",
+ "notifications": 1,
+ "restrict_to_domain": null,
+ "role_name": "Smith",
+ "search_bar": 1,
+ "timeline": 1,
+ "two_factor_auth": 0,
+ "view_switcher": 1
+ },
+ {
+ "bulk_actions": 1,
+ "dashboard": 1,
+ "desk_access": 1,
+ "disabled": 0,
+ "docstatus": 0,
+ "doctype": "Role",
+ "form_sidebar": 1,
+ "home_page": null,
+ "is_custom": 0,
+ "list_sidebar": 1,
+ "modified": "2024-02-01 12:22:37.829708",
+ "name": "AuMMS Manager",
+ "notifications": 1,
+ "restrict_to_domain": null,
+ "role_name": "AuMMS Manager",
+ "search_bar": 1,
+ "timeline": 1,
+ "two_factor_auth": 0,
+ "view_switcher": 1
+ }
+ ]
\ No newline at end of file
diff --git a/aumms/fixtures/workflow_action_master.json b/aumms/fixtures/workflow_action_master.json
index bcec71f3..858843ca 100644
--- a/aumms/fixtures/workflow_action_master.json
+++ b/aumms/fixtures/workflow_action_master.json
@@ -1,37 +1,39 @@
+
[
- {
- "docstatus": 0,
- "doctype": "Workflow Action Master",
- "modified": "2024-02-03 10:34:51.940832",
- "name": "Approve",
- "workflow_action_name": "Approve"
- },
- {
- "docstatus": 0,
- "doctype": "Workflow Action Master",
- "modified": "2024-02-03 10:34:51.942167",
- "name": "Reject",
- "workflow_action_name": "Reject"
- },
- {
- "docstatus": 0,
- "doctype": "Workflow Action Master",
- "modified": "2024-04-02 10:46:16.390196",
- "name": "Submit",
- "workflow_action_name": "Submit"
- },
- {
- "docstatus": 0,
- "doctype": "Workflow Action Master",
- "modified": "2024-04-02 10:47:10.321135",
- "name": "Submit for Feasibility check",
- "workflow_action_name": "Submit for Feasibility check"
- },
- {
- "docstatus": 0,
- "doctype": "Workflow Action Master",
- "modified": "2024-04-03 11:40:05.185475",
- "name": "Cancel",
- "workflow_action_name": "Cancel"
- }
-]
\ No newline at end of file
+ {
+ "docstatus": 0,
+ "doctype": "Workflow Action Master",
+ "modified": "2024-02-03 10:34:51.940832",
+ "name": "Approve",
+ "workflow_action_name": "Approve"
+ },
+ {
+ "docstatus": 0,
+ "doctype": "Workflow Action Master",
+ "modified": "2024-02-03 10:34:51.942167",
+ "name": "Reject",
+ "workflow_action_name": "Reject"
+ },
+ {
+ "docstatus": 0,
+ "doctype": "Workflow Action Master",
+ "modified": "2024-04-02 10:46:16.390196",
+ "name": "Submit",
+ "workflow_action_name": "Submit"
+ },
+ {
+ "docstatus": 0,
+ "doctype": "Workflow Action Master",
+ "modified": "2024-04-02 10:47:10.321135",
+ "name": "Submit for Feasibility check",
+ "workflow_action_name": "Submit for Feasibility check"
+ },
+ {
+ "docstatus": 0,
+ "doctype": "Workflow Action Master",
+ "modified": "2024-04-03 11:40:05.185475",
+ "name": "Cancel",
+ "workflow_action_name": "Cancel"
+ }
+ ]
+
\ No newline at end of file
diff --git a/aumms/hooks.py b/aumms/hooks.py
index 6b62ff47..c28f91ea 100644
--- a/aumms/hooks.py
+++ b/aumms/hooks.py
@@ -1,4 +1,3 @@
-from . import __version__ as app_version
app_name = "aumms"
app_title = "AuMMS"
@@ -75,14 +74,21 @@
# ------------
# before_install = "aumms.install.before_install"
-# after_install = [
-# 'aumms.setup.setup_aumms_defaults'
-# ]
+
+
+after_install = [
+ 'aumms.setup.setup_aumms_defaults',
+ 'aumms.setup.after_install'
+ ]
after_migrate = [
'aumms.setup.setup_aumms_defaults',
- 'aumms.aumms.utils.increase_precision'
+ 'aumms.aumms.utils.increase_precision',
+ 'aumms.setup.after_migrate'
+
]
+
+
# Uninstallation
# ------------
@@ -183,6 +189,10 @@
},
'Work Order':{
'after_insert' : 'aumms.aumms.doc_events.work_order.change_design_analysis_status'
+ },
+ 'Stock Reconciliation': {
+ 'on_submit': 'aumms.aumms.doc_events.stock_reconciliation.create_mle_against_sr',
+ 'on_cancel': 'aumms.aumms.doc_events.stock_reconciliation.reverse_mle_against_sr',
}
}
diff --git a/aumms/setup.py b/aumms/setup.py
index 37fd925a..c40c9047 100644
--- a/aumms/setup.py
+++ b/aumms/setup.py
@@ -1,5 +1,19 @@
import frappe
from frappe import _
+from frappe.custom.doctype.custom_field.custom_field import create_custom_fields
+
+
+def after_install():
+ #Creating AuMMS specific custom fields
+ create_custom_fields(get_stock_reconciliation_custom_fields(), ignore_validate=True)
+ create_custom_fields(get_metal_ledger_custom_fields(), ignore_validate=True)
+ create_custom_fields(get_purchase_receipt_custom_fields(), ignore_validate=True)
+ create_custom_fields(get_sales_invoice_custom_fields(), ignore_validate=True)
+ create_custom_fields(get_jewellery_invoice_custom_fields(), ignore_validate=True)
+ create_custom_fields(get_sales_order_custom_fields(), ignore_validate=True)
+
+def after_migrate():
+ after_install()
def is_setup_completed():
if frappe.db.get_single_value("System Settings", "setup_complete"):
@@ -77,3 +91,138 @@ def create_department_for_smith():
department_doc.is_group = 1
department_doc.insert(ignore_permissions = True)
frappe.db.commit()
+
+
+
+def get_stock_reconciliation_custom_fields():
+ '''
+ Custom fields that need to be added to the Stock Reconciliation Doctype
+ '''
+ return {
+ "Stock Reconciliation": [
+ {
+ "fieldname": "keep_metal_ledger",
+ "fieldtype": "Check",
+ "label": "Keep Metal Ledger",
+ "insert_after": "purpose"
+ }
+ ]
+ }
+
+def get_metal_ledger_custom_fields():
+ '''
+ Custom fields that need to be added to the Metal Ledger Entry Doctype
+ '''
+ return {
+ "Metal Ledger Entry": [
+ {
+ "fieldname": "entry_type",
+ "fieldtype": "Data",
+ "label": "Entry Type",
+ "insert_after": "voucher_type",
+ "read_only":1
+ }
+ ]
+ }
+
+
+def get_purchase_receipt_custom_fields():
+ '''
+ Custom fields that need to be added to the Purchase Receipt Doctype
+ '''
+ return {
+ "Purchase Receipt":[
+
+ ],
+ "Purchase Receipt Item" : [
+ {
+ "fieldname": "board_rate",
+ "fieldtype": "Data",
+ "label": "Board Rate",
+ "insert_after": "amount"
+ },
+ {
+ "fieldname": "stone_weight",
+ "fieldtype": "Data",
+ "label": "Stone Weight",
+ "insert_after": "is_free_item"
+ },
+ {
+ "fieldname": "stone_charge",
+ "fieldtype": "Data",
+ "label": "Stone Charge",
+ "insert_after": "stone_weight"
+ },
+ {
+ "fieldname": "making_charge",
+ "fieldtype": "Data",
+ "label": "Making Charge",
+ "insert_after": "board_rate"
+ }
+
+ ]
+ }
+
+
+def get_sales_invoice_custom_fields():
+ '''
+ Custom fields that need to be added to the Sales Invoice Doctype
+ '''
+ return {
+ "Sales Invoice": [
+
+ ],
+ "Sales Invoice Item": [
+ {
+ "fieldname": "board_rate",
+ "fieldtype": "Data",
+ "label": "Board Rate",
+ "insert_after": "amount"
+ }
+ ]
+ }
+
+
+def get_jewellery_invoice_custom_fields():
+ return {
+ "Jewellery Invoice": [
+ {
+ "fieldname": "discounts",
+ "fieldtype": "Section Break",
+ "label": "Discounts",
+ "insert_after": "stone_details"
+ },
+ {
+ "fieldname": "discount_amount",
+ "fieldtype": "Data",
+ "label": "Discount Amount",
+ "insert_after": "discounts"
+ },
+ {
+ "fieldname": "discount_column_break",
+ "fieldtype": "Column Break",
+ "label": "",
+ "insert_after": "discount_amount"
+ }
+ ]
+ }
+
+
+
+def get_sales_order_custom_fields():
+ '''
+ Custom fields that need to be added to the Sales Order Doctype
+ '''
+ return {
+ "Sales Order": [
+
+ ],
+ "Sales Order Item": [
+ {
+ "fieldname": "board_rate",
+ "fieldtype": "Data",
+ "label": "Board Rate",
+ "insert_after": "amount"
+ }
+ ]
+ }
\ No newline at end of file