parent
9ac63da457
commit
8e8434a78a
@ -1,6 +1,8 @@
|
|||||||
erpnext.setup_einvoice_actions = (doctype) => {
|
erpnext.setup_einvoice_actions = (doctype) => {
|
||||||
frappe.ui.form.on(doctype, {
|
frappe.ui.form.on(doctype, {
|
||||||
async refresh(frm) {
|
async refresh(frm) {
|
||||||
|
if (frm.doc.docstatus == 2) return;
|
||||||
|
|
||||||
const res = await frappe.call({
|
const res = await frappe.call({
|
||||||
method: 'erpnext.regional.india.e_invoice.utils.validate_eligibility',
|
method: 'erpnext.regional.india.e_invoice.utils.validate_eligibility',
|
||||||
args: { doc: frm.doc }
|
args: { doc: frm.doc }
|
||||||
@ -111,7 +113,7 @@ erpnext.setup_einvoice_actions = (doctype) => {
|
|||||||
|
|
||||||
if (irn && ewaybill && !irn_cancelled && !eway_bill_cancelled) {
|
if (irn && ewaybill && !irn_cancelled && !eway_bill_cancelled) {
|
||||||
const action = () => {
|
const action = () => {
|
||||||
let message = __('Cancellation of e-way bill is currently not supported. ');
|
let message = __('Cancellation of e-way bill is currently not supported.') + ' ';
|
||||||
message += '<br><br>';
|
message += '<br><br>';
|
||||||
message += __('You must first use the portal to cancel the e-way bill and then update the cancelled status in the ERPNext system.');
|
message += __('You must first use the portal to cancel the e-way bill and then update the cancelled status in the ERPNext system.');
|
||||||
|
|
||||||
|
@ -188,9 +188,10 @@ def get_item_list(invoice):
|
|||||||
|
|
||||||
item.qty = abs(item.qty)
|
item.qty = abs(item.qty)
|
||||||
|
|
||||||
item.unit_rate = abs((abs(item.taxable_value) - item.discount_amount)/ item.qty)
|
item.unit_rate = abs(item.taxable_value / item.qty)
|
||||||
item.gross_amount = abs(item.taxable_value) + item.discount_amount
|
item.gross_amount = abs(item.taxable_value)
|
||||||
item.taxable_value = abs(item.taxable_value)
|
item.taxable_value = abs(item.taxable_value)
|
||||||
|
item.discount_amount = 0
|
||||||
|
|
||||||
item.batch_expiry_date = frappe.db.get_value('Batch', d.batch_no, 'expiry_date') if d.batch_no else None
|
item.batch_expiry_date = frappe.db.get_value('Batch', d.batch_no, 'expiry_date') if d.batch_no else None
|
||||||
item.batch_expiry_date = format_date(item.batch_expiry_date, 'dd/mm/yyyy') if item.batch_expiry_date else None
|
item.batch_expiry_date = format_date(item.batch_expiry_date, 'dd/mm/yyyy') if item.batch_expiry_date else None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user