Print Order: | 130 |${doc.print_order || ""} | 131 |
---|---|
Customer: | 134 |${doc.customer_name || doc.customer || ""} | 135 |
Fabric: | 138 |${doc.fabric_item_name || doc.fabric_item || ""} | 139 |
Packed: | 142 |143 | ${this.get_formatted("packed_qty", doc)} 144 | / 145 | ${this.get_formatted("completed_qty", doc)} 146 | Meter 147 | | 148 |
Print Order: | 47 |${doc.print_order || ""} | 48 |
---|---|
Customer: | 51 |${doc.customer_name || doc.customer || ""} | 52 |
Fabric: | 55 |${doc.fabric_item_name || doc.fabric_item || ""} | 56 |
Produced: | 59 |60 | ${this.get_formatted("completed_qty", doc)} 61 | / 62 | ${this.get_formatted("qty", doc)} 63 | ${doc.stock_uom} 64 | (${this.get_formatted("per_produced", doc)}) 65 | | 66 |
Design Name | 6 |Qty | 7 |UOM | 8 |Qty Type | 9 |Gap (in.) | 10 ||||||
---|---|---|---|---|---|---|---|---|---|
13 | 14 | 15 | | 16 |17 | 18 | 19 | | 20 |21 | 22 | 23 | | 24 |25 | 26 | 27 | | 28 |29 | 30 | 31 | | 32 ||||||
Size (in.) | 36 |Print Qty | 37 |Fabric Qty | 38 |Panel Qty | 39 |Produced | 40 |Packed | 41 |Delivered | 42 ||||
45 | 46 | | 47 |48 | 49 | | 50 |51 | 52 | | 53 |54 | 55 | | 56 |57 | 58 | | 59 |60 | 61 | | 62 |63 | 64 | | 65 |
{%= __("Date") %} | 80 | 81 |{%= __("Voucher") %} | 82 | 83 |{%= __("Fabric") %} | 84 | 85 | {% if !filters.customer %} 86 |{%= __("Customer") %} | 87 | {% endif %} 88 | 89 |{%= __("UOM") %} | 90 | 91 |{%= __("In") %} | 92 | 93 |{%= __("Out") %} | 94 | 95 |{%= __("Balance") %} | 96 |
---|---|---|---|---|---|---|---|
103 | {%= d.posting_date ? frappe.datetime.str_to_user(d.posting_date) : "" %} 104 | | 105 | 106 |
107 | {%= d.entry_type %}
108 | {%= d.document_no %}
109 | |
110 |
111 |
112 | {%= d.fabric_item_name %}
113 | {% if d.is_closing && flt(d.packed_qty_after_transaction, 2) %}
114 | Packed Qty: {%= format_number(d.packed_qty_after_transaction, null, 2) %}
115 | {% endif %}
116 | |
117 |
118 | {% if !filters.customer %}
119 | {%= d.party_name %} | 120 | {% endif %} 121 | 122 |{%= d.uom %} | 123 | 124 |125 | {%= d.in_qty ? format_number(d.in_qty, null, 2) : "" %} 126 | | 127 | 128 |129 | {%= d.out_qty ? format_number(d.out_qty, null, 2) : "" %} 130 | | 131 | 132 |133 | {%= d.qty_after_transaction != null ? format_number(d.qty_after_transaction, null, 2) : "" %} 134 | | 135 |
Printed On {%= frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string()) %}
-------------------------------------------------------------------------------- /textile/textile/report/fabric_ledger/fabric_ledger.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2024, ParaLogic and contributors 2 | // For license information, please see license.txt 3 | /* eslint-disable */ 4 | 5 | frappe.query_reports["Fabric Ledger"] = { 6 | "filters": [ 7 | { 8 | "fieldname": "company", 9 | "label": __("Company"), 10 | "fieldtype": "Link", 11 | "options": "Company", 12 | "default": frappe.defaults.get_user_default("Company"), 13 | "bold": 1 14 | }, 15 | { 16 | "fieldname": "from_date", 17 | "label": __("From Date"), 18 | "fieldtype": "Date", 19 | "default": frappe.datetime.add_months(frappe.datetime.get_today(), -1), 20 | "reqd": 1 21 | }, 22 | { 23 | "fieldname": "to_date", 24 | "label": __("To Date"), 25 | "fieldtype": "Date", 26 | "default": frappe.datetime.get_today(), 27 | "reqd": 1 28 | }, 29 | { 30 | "fieldname": "customer", 31 | "label": __("Customer"), 32 | "fieldtype": "Link", 33 | "options": "Customer" 34 | }, 35 | { 36 | "fieldname": "item_code", 37 | "label": __("Fabric Item"), 38 | "fieldtype": "Link", 39 | "options": "Item", 40 | "get_query": function() { 41 | let out = { 42 | query: "erpnext.controllers.queries.item_query", 43 | filters: { 44 | "include_disabled": 1, 45 | "textile_item_type": ["in", ["Greige Fabric", "Ready Fabric"]] 46 | } 47 | } 48 | 49 | let customer = frappe.query_report.get_filter_value("customer"); 50 | if (customer) { 51 | out.filters['customer'] = customer; 52 | } 53 | 54 | return out; 55 | }, 56 | on_change: function() { 57 | let item_code = frappe.query_report.get_filter_value('item_code'); 58 | if (!item_code) { 59 | frappe.query_report.set_filter_value('item_name', ""); 60 | } else { 61 | frappe.db.get_value("Item", item_code, ['item_name', 'customer'], function(value) { 62 | frappe.query_report.set_filter_value('customer', value['customer']); 63 | frappe.query_report.set_filter_value('item_name', value['item_name']); 64 | }); 65 | } 66 | } 67 | }, 68 | { 69 | "fieldname": "item_name", 70 | "label": __("Fabric Name"), 71 | "fieldtype": "Data", 72 | "read_only": 1, 73 | }, 74 | { 75 | "fieldname": "batch_no", 76 | "label": __("Batch No"), 77 | "fieldtype": "Link", 78 | "options": "Batch", 79 | "get_query": function() { 80 | let filters = {}; 81 | 82 | let item_code = frappe.query_report.get_filter_value("item_code"); 83 | if (item_code) { 84 | filters['item'] = item_code; 85 | } 86 | 87 | return { 88 | filters: filters 89 | }; 90 | }, 91 | }, 92 | { 93 | "fieldname": "hide_internal_entries", 94 | "label": __("Hide Internal Entries"), 95 | "fieldtype": "Check", 96 | "default": 1, 97 | }, 98 | { 99 | "fieldname": "merge_print_production", 100 | "label": __("Merge Print Production Entries"), 101 | "fieldtype": "Check", 102 | "default": 1, 103 | }, 104 | { 105 | "fieldname": "combine_greige_ready", 106 | "label": __("Combine Greige and Ready Fabric"), 107 | "fieldtype": "Check", 108 | "default": 1, 109 | }, 110 | { 111 | "fieldname": "orientation", 112 | "label": __("Orientation"), 113 | "fieldtype": "Data", 114 | "default": "Portrait", 115 | "hidden": 1, 116 | }, 117 | ], 118 | formatter: function(value, row, column, data, default_formatter) { 119 | var style = {}; 120 | 121 | $.each(['in_qty', 'out_qty'], function (i, f) { 122 | if (flt(value)) { 123 | if (column.fieldname === 'in_qty') { 124 | style['color'] = 'green'; 125 | } 126 | if (column.fieldname === 'out_qty') { 127 | style['color'] = 'red'; 128 | } 129 | 130 | if (data.is_internal_entry && ['in_qty', 'out_qty'].includes(column.fieldname)) { 131 | style['color'] = 'var(--gray-600)'; 132 | } 133 | } 134 | }); 135 | 136 | return default_formatter(value, row, column, data, {css: style}); 137 | }, 138 | }; 139 | -------------------------------------------------------------------------------- /textile/textile/report/fabric_ledger/fabric_ledger.json: -------------------------------------------------------------------------------- 1 | { 2 | "add_total_row": 0, 3 | "columns": [], 4 | "creation": "2024-05-12 20:11:50.864999", 5 | "disable_prepared_report": 0, 6 | "disabled": 0, 7 | "docstatus": 0, 8 | "doctype": "Report", 9 | "filters": [], 10 | "idx": 0, 11 | "is_standard": "Yes", 12 | "modified": "2024-05-12 20:11:50.864999", 13 | "modified_by": "Administrator", 14 | "module": "Textile", 15 | "name": "Fabric Ledger", 16 | "owner": "Administrator", 17 | "prepared_report": 0, 18 | "ref_doctype": "Stock Ledger Entry", 19 | "report_name": "Fabric Ledger", 20 | "report_type": "Script Report", 21 | "roles": [ 22 | { 23 | "role": "Stock User" 24 | }, 25 | { 26 | "role": "Accounts User" 27 | }, 28 | { 29 | "role": "Sales User" 30 | }, 31 | { 32 | "role": "Sales User (Read Only)" 33 | }, 34 | { 35 | "role": "Manufacturing User" 36 | }, 37 | { 38 | "role": "Purchase User" 39 | }, 40 | { 41 | "role": "Delivery User" 42 | } 43 | ] 44 | } -------------------------------------------------------------------------------- /textile/textile/report/fabric_packing_list/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ParaLogicTech/textile/5f7d91ee5e6ea5c9648508ad1e235aae7addae55/textile/textile/report/fabric_packing_list/__init__.py -------------------------------------------------------------------------------- /textile/textile/report/fabric_packing_list/fabric_packing_list.html: -------------------------------------------------------------------------------- 1 | 41 | 42 |{%= __("Sr.") %} | 57 |{%= __("Reference") %} | 58 | 59 | {% if show_date %} 60 |{%= __("Date") %} | 61 | {% endif %} 62 | 63 |{%= __("Item") %} | 64 | 65 | {% if show_design_image %} 66 |{%= __("Design") %} | 67 | {% endif %} 68 | 69 |{%= __("Qty") %} | 70 |{%= __("Return") %} | 71 |{%= __("Total") %} | 72 |{%= __("UOM") %} | 73 |{%= __("Panels") %} | 74 | 75 | 76 | 77 | {% for (let d of data) { %} 78 |
---|---|---|---|---|---|---|---|---|---|
{%= d._group_idx %} | 80 |{%= d.reference_type != "Item" ? d.reference : "" %} | 81 | 82 | {% if show_date %} 83 |{%= d.posting_date ? frappe.datetime.str_to_user(d.posting_date) : "" %} | 84 | {% endif %} 85 | 86 |{%= d.item_name %} | 87 | 88 | {% if show_design_image %} 89 |
90 | {% if (d.image) { %}
91 | |
94 | {% endif %}
95 |
96 | {%= d.qty ? format_number(d.qty, null, 2) : "" %} | 97 |{%= d.return_qty ? format_number(d.return_qty, null, 2) : "" %} | 98 |{%= d.total_qty ? format_number(d.total_qty, null, 2) : "" %} | 99 |{%= d.uom %} | 100 |{%= d.panel_qty ? format_number(d.panel_qty, null, 1) : "" %} | 101 |