add naming series option

This commit is contained in:
hello@openetech.com 2019-10-19 00:19:21 +05:30 committed by Rohit Waghchaure
parent fa8159efa3
commit 5fadd355df
2 changed files with 11 additions and 2 deletions

View File

@ -4,6 +4,7 @@
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"invoice_series",
"company",
"item_code",
"supplier_group",
@ -67,9 +68,16 @@
"fieldtype": "Data",
"label": "Status",
"read_only": 1
},
{
"fieldname": "invoice_series",
"fieldtype": "Select",
"label": "Invoice Series",
"options": "ACC-PINV-.YYYY.-",
"reqd": 1
}
],
"modified": "2019-10-16 02:00:00.538268",
"modified": "2019-10-19 00:15:11.404733",
"modified_by": "Administrator",
"module": "Regional",
"name": "Import Supplier Invoice",

View File

@ -158,6 +158,7 @@ class ImportSupplierInvoice(Document):
pin_code = pin_code, country = country)
pi_name = create_purchase_invoice(company = self.company,
naming_series = self.invoice_series,
supplier_name = supplier_name,
bill_no = invoice_no,
document_type = document_type,
@ -295,7 +296,7 @@ def create_purchase_invoice(**args):
pi = frappe.get_doc({
"doctype": "Purchase Invoice",
"company": args.company,
"naming_series": "PINV-",
"naming_series": args.naming_series,
"supplier": args.supplier_name,
"is_return": args.is_return,
"posting_date": today(),