mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-13 07:18:27 +00:00
fix: sider issues
This commit is contained in:
@@ -1982,7 +1982,7 @@ def make_sales_invoice_for_ewaybill():
|
||||
address.save()
|
||||
|
||||
if not frappe.db.exists('Supplier', '_Test Transporter'):
|
||||
supplier = frappe.get_doc({
|
||||
frappe.get_doc({
|
||||
"doctype": "Supplier",
|
||||
"supplier_name": "_Test Transporter",
|
||||
"country": "India",
|
||||
|
||||
@@ -3,7 +3,7 @@ erpnext.setup_einvoice_actions = (doctype) => {
|
||||
refresh(frm) {
|
||||
const einvoicing_enabled = frappe.db.get_value("E Invoice Settings", "E Invoice Settings", "enable");
|
||||
const supply_type = frm.doc.gst_category;
|
||||
const valid_supply_type = ['Registered Regular', 'SEZ', 'Overseas', 'Deemed Export'].includes(supply_type)
|
||||
const valid_supply_type = ['Registered Regular', 'SEZ', 'Overseas', 'Deemed Export'].includes(supply_type);
|
||||
|
||||
if (!einvoicing_enabled || !valid_supply_type) return;
|
||||
|
||||
@@ -13,7 +13,7 @@ erpnext.setup_einvoice_actions = (doctype) => {
|
||||
if (!frm.custom_buttons[label]) {
|
||||
frm.add_custom_button(label, action, __('E Invoicing'));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if (ewaybill && irn) {
|
||||
frm.set_df_property('ewaybill', 'read_only', 1);
|
||||
@@ -26,7 +26,7 @@ erpnext.setup_einvoice_actions = (doctype) => {
|
||||
args: { doctype, docname: name },
|
||||
freeze: true,
|
||||
callback: () => frm.reload_doc()
|
||||
})
|
||||
});
|
||||
};
|
||||
|
||||
add_custom_button(__("Generate IRN"), action);
|
||||
@@ -35,7 +35,7 @@ erpnext.setup_einvoice_actions = (doctype) => {
|
||||
if (docstatus == 1 && irn && !irn_cancelled && !ewaybill) {
|
||||
const fields = [
|
||||
{
|
||||
"label" : "Reason",
|
||||
"label": "Reason",
|
||||
"fieldname": "reason",
|
||||
"fieldtype": "Select",
|
||||
"reqd": 1,
|
||||
@@ -95,7 +95,7 @@ erpnext.setup_einvoice_actions = (doctype) => {
|
||||
freeze: true,
|
||||
callback: () => frm.reload_doc() || d.hide(),
|
||||
error: () => d.hide()
|
||||
})
|
||||
});
|
||||
},
|
||||
primary_action_label: __('Submit')
|
||||
});
|
||||
@@ -108,7 +108,7 @@ erpnext.setup_einvoice_actions = (doctype) => {
|
||||
if (docstatus == 1 && irn && ewaybill && !irn_cancelled && !eway_bill_cancelled) {
|
||||
const fields = [
|
||||
{
|
||||
"label" : "Reason",
|
||||
"label": "Reason",
|
||||
"fieldname": "reason",
|
||||
"fieldtype": "Select",
|
||||
"reqd": 1,
|
||||
@@ -140,7 +140,7 @@ erpnext.setup_einvoice_actions = (doctype) => {
|
||||
freeze: true,
|
||||
callback: () => frm.reload_doc() || d.hide(),
|
||||
error: () => d.hide()
|
||||
})
|
||||
});
|
||||
},
|
||||
primary_action_label: __('Submit')
|
||||
});
|
||||
@@ -149,8 +149,8 @@ erpnext.setup_einvoice_actions = (doctype) => {
|
||||
add_custom_button(__("Cancel E-Way Bill"), action);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const get_ewaybill_fields = (frm) => {
|
||||
return [
|
||||
@@ -236,4 +236,4 @@ const get_ewaybill_fields = (frm) => {
|
||||
'default': frm.doc.gst_vehicle_type
|
||||
}
|
||||
];
|
||||
}
|
||||
};
|
||||
@@ -13,7 +13,6 @@ import frappe
|
||||
import traceback
|
||||
from frappe import _, bold
|
||||
from pyqrcode import create as qrcreate
|
||||
from frappe.model.document import Document
|
||||
from frappe.integrations.utils import make_post_request, make_get_request
|
||||
from erpnext.regional.india.utils import get_gst_accounts, get_place_of_supply
|
||||
from frappe.utils.data import cstr, cint, formatdate as format_date, flt, time_diff_in_seconds, now_datetime, add_to_date
|
||||
@@ -89,7 +88,6 @@ def get_party_details(address_name):
|
||||
|
||||
gstin_details = get_gstin_details(gstin)
|
||||
legal_name = gstin_details.get('LegalName')
|
||||
trade_name = gstin_details.get('TradeName')
|
||||
location = gstin_details.get('AddrLoc') or address.get('city')
|
||||
state_code = gstin_details.get('StateCode')
|
||||
pincode = gstin_details.get('AddrPncd')
|
||||
@@ -585,7 +583,6 @@ class GSPConnector():
|
||||
|
||||
def cancel_eway_bill(self, eway_bill, reason, remark):
|
||||
headers = self.get_headers()
|
||||
doctype = 'Sales Invoice'
|
||||
data = json.dumps({
|
||||
'ewbNo': eway_bill,
|
||||
'cancelRsnCode': reason,
|
||||
|
||||
Reference in New Issue
Block a user