Merge pull request #33014 from deepeshgarg007/multi_invoice_payment

fix: Bulk payment generation against invoices
This commit is contained in:
Deepesh Garg 2022-11-18 15:10:35 +05:30 committed by GitHub
commit df096688f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 6 deletions

View File

@ -63,7 +63,7 @@ frappe.listview_settings["Purchase Invoice"] = {
});
listview.page.add_action_item(__("Payment"), ()=>{
erpnext.bulk_transaction_processing.create(listview, "Purchase Invoice", "Payment");
erpnext.bulk_transaction_processing.create(listview, "Purchase Invoice", "Payment Entry");
});
}
};

View File

@ -29,7 +29,7 @@ frappe.listview_settings['Sales Invoice'] = {
});
listview.page.add_action_item(__("Payment"), ()=>{
erpnext.bulk_transaction_processing.create(listview, "Sales Invoice", "Payment");
erpnext.bulk_transaction_processing.create(listview, "Sales Invoice", "Payment Entry");
});
}
};

View File

@ -73,7 +73,7 @@ def task(doc_name, from_doctype, to_doctype):
},
"Sales Invoice": {
"Delivery Note": sales_invoice.make_delivery_note,
"Payment": payment_entry.get_payment_entry,
"Payment Entry": payment_entry.get_payment_entry,
},
"Delivery Note": {
"Sales Invoice": delivery_note.make_sales_invoice,
@ -94,11 +94,11 @@ def task(doc_name, from_doctype, to_doctype):
},
"Purchase Invoice": {
"Purchase Receipt": purchase_invoice.make_purchase_receipt,
"Payment": payment_entry.get_payment_entry,
"Payment Entry": payment_entry.get_payment_entry,
},
"Purchase Receipt": {"Purchase Invoice": purchase_receipt.make_purchase_invoice},
}
if to_doctype in ["Advance Payment", "Payment"]:
if to_doctype in ["Advance Payment", "Payment Entry"]:
obj = mapper[from_doctype][to_doctype](from_doctype, doc_name)
else:
obj = mapper[from_doctype][to_doctype](doc_name)
@ -151,7 +151,9 @@ def update_logger(doc_name, e, from_doctype, to_doctype, status, log_date=None,
def show_job_status(fail_count, deserialized_data_count, to_doctype):
if not fail_count:
frappe.msgprint(
_("Creation of {0} successful").format(to_doctype),
_("Creation of <b><a href='/app/{0}'>{1}(s)</a></b> successful").format(
to_doctype.lower().replace(" ", "-"), to_doctype
),
title="Successful",
indicator="green",
)