mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-19 13:09:17 +00:00
This commit is contained in:
@@ -316,10 +316,6 @@ def get_payment_details(invoice):
|
|||||||
))
|
))
|
||||||
|
|
||||||
def get_return_doc_reference(invoice):
|
def get_return_doc_reference(invoice):
|
||||||
if not invoice.return_against:
|
|
||||||
frappe.throw(_('For generating IRN, reference to the original invoice is mandatory for a credit note. Please set {} field to generate e-invoice.')
|
|
||||||
.format(frappe.bold('Return Against')), title=_('Missing Field'))
|
|
||||||
|
|
||||||
invoice_date = frappe.db.get_value('Sales Invoice', invoice.return_against, 'posting_date')
|
invoice_date = frappe.db.get_value('Sales Invoice', invoice.return_against, 'posting_date')
|
||||||
return frappe._dict(dict(
|
return frappe._dict(dict(
|
||||||
invoice_name=invoice.return_against, invoice_date=format_date(invoice_date, 'dd/mm/yyyy')
|
invoice_name=invoice.return_against, invoice_date=format_date(invoice_date, 'dd/mm/yyyy')
|
||||||
@@ -435,7 +431,7 @@ def make_einvoice(invoice):
|
|||||||
if invoice.is_pos and invoice.base_paid_amount:
|
if invoice.is_pos and invoice.base_paid_amount:
|
||||||
payment_details = get_payment_details(invoice)
|
payment_details = get_payment_details(invoice)
|
||||||
|
|
||||||
if invoice.is_return:
|
if invoice.is_return and invoice.return_against:
|
||||||
prev_doc_details = get_return_doc_reference(invoice)
|
prev_doc_details = get_return_doc_reference(invoice)
|
||||||
|
|
||||||
if invoice.transporter and not invoice.is_return:
|
if invoice.transporter and not invoice.is_return:
|
||||||
|
|||||||
Reference in New Issue
Block a user