feat(selling): add proforma invoice settings and tracking field

- Selling Settings: "Enable Proforma Invoice" toggle (opt-in) and a
  default proforma print format
- Sales Order Item: non-blocking proforma_qty counter
This commit is contained in:
Nabin Hait
2026-07-16 16:51:37 +05:30
parent ac68db3fa6
commit fbdc1f5b1f
4 changed files with 35 additions and 0 deletions

View File

@@ -102,6 +102,7 @@
"column_break_69",
"work_order_qty",
"delivered_qty",
"proforma_qty",
"produced_qty",
"returned_qty",
"picked_qty",
@@ -702,6 +703,14 @@
"read_only": 1,
"width": "100px"
},
{
"fieldname": "proforma_qty",
"fieldtype": "Float",
"label": "Proforma Qty",
"no_copy": 1,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "work_order_qty",
"fieldtype": "Float",

View File

@@ -71,6 +71,7 @@ class SalesOrderItem(Document):
price_list_rate: DF.Currency
pricing_rules: DF.SmallText | None
produced_qty: DF.Float
proforma_qty: DF.Float
production_plan_qty: DF.Float
project: DF.Link | None
projected_qty: DF.Float

View File

@@ -60,6 +60,9 @@
"allow_delivery_of_overproduced_qty",
"column_break_mla9",
"deliver_secondary_items",
"proforma_invoice_section",
"enable_proforma_invoice",
"default_proforma_print_format",
"default_naming_tab",
"transaction_naming_html"
],
@@ -341,6 +344,26 @@
"fieldtype": "Check",
"label": "Deliver secondary Items"
},
{
"fieldname": "proforma_invoice_section",
"fieldtype": "Section Break",
"label": "Proforma Invoice"
},
{
"default": "0",
"description": "Allow issuing Proforma Invoices against a Sales Order.",
"fieldname": "enable_proforma_invoice",
"fieldtype": "Check",
"label": "Enable Proforma Invoice"
},
{
"depends_on": "enable_proforma_invoice",
"description": "Default print format used when generating a Proforma Invoice PDF.",
"fieldname": "default_proforma_print_format",
"fieldtype": "Link",
"label": "Default Proforma Print Format",
"options": "Print Format"
},
{
"fieldname": "customer_defaults_tab",
"fieldtype": "Tab Break",

View File

@@ -41,6 +41,7 @@ class SellingSettings(Document):
blanket_order_allowance: DF.Float
cust_master_name: DF.Literal["Customer Name", "Naming Series", "Auto Name"]
customer_group: DF.Link | None
default_proforma_print_format: DF.Link | None
deliver_secondary_items: DF.Check
dn_required: DF.Literal["No", "Yes"]
dont_reserve_sales_order_qty_on_sales_return: DF.Check
@@ -48,6 +49,7 @@ class SellingSettings(Document):
editable_price_list_rate: DF.Check
enable_cutoff_date_on_bulk_delivery_note_creation: DF.Check
enable_discount_accounting: DF.Check
enable_proforma_invoice: DF.Check
enable_tracking_sales_commissions: DF.Check
enable_utm: DF.Check
fallback_to_default_price_list: DF.Check