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