mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 19:59:12 +00:00
code review changes
This commit is contained in:
committed by
Rohit Waghchaure
parent
5b33765a8c
commit
9e0762e8c2
@@ -164,19 +164,13 @@ class ImportSupplierInvoice(Document):
|
|||||||
city = city, province = province,
|
city = city, province = province,
|
||||||
pin_code = pin_code, country = country)
|
pin_code = pin_code, country = country)
|
||||||
|
|
||||||
pi_name = create_purchase_invoice(company = self.company,
|
pi_name = create_purchase_invoice(company = self.company, naming_series = self.invoice_series,
|
||||||
naming_series = self.invoice_series,
|
supplier_name = supplier_name, bill_no = invoice_no,
|
||||||
supplier_name = supplier_name,
|
document_type = document_type, bill_date = bill_date,
|
||||||
bill_no = invoice_no,
|
is_return = return_invoice, destination_code = destination_code,
|
||||||
document_type = document_type,
|
total_discount = total_discount, items = items,
|
||||||
bill_date = bill_date,
|
taxes = taxes, terms = terms,file_name = file_name)
|
||||||
is_return = return_invoice,
|
|
||||||
destination_code = destination_code,
|
|
||||||
total_discount = total_discount,
|
|
||||||
items = items,
|
|
||||||
taxes = taxes,
|
|
||||||
terms = terms,
|
|
||||||
file_name = file_name)
|
|
||||||
file_count += 1
|
file_count += 1
|
||||||
if pi_name:
|
if pi_name:
|
||||||
pi_count += 1
|
pi_count += 1
|
||||||
@@ -365,15 +359,6 @@ def create_uom(uom):
|
|||||||
new_uom.save()
|
new_uom.save()
|
||||||
return new_uom.uom_name
|
return new_uom.uom_name
|
||||||
|
|
||||||
def check_bill_no(invoice_no):
|
|
||||||
|
|
||||||
existing_bill_no = frappe.db.get_value("Purchase Invoice",
|
|
||||||
filters={"bill_no": invoice_no, "docstatus": 1}, fieldname="name")
|
|
||||||
if existing_bill_no:
|
|
||||||
return existing_bill_no
|
|
||||||
else:
|
|
||||||
return None
|
|
||||||
|
|
||||||
def get_full_path(file_name):
|
def get_full_path(file_name):
|
||||||
"""Returns file path from given file name"""
|
"""Returns file path from given file name"""
|
||||||
file_path = file_name
|
file_path = file_name
|
||||||
|
|||||||
Reference in New Issue
Block a user