fix: Revert Changes
This commit is contained in:
parent
0dfea4d134
commit
2908f2ee20
@ -139,10 +139,36 @@ erpnext.setup.slides_settings = [
|
||||
},
|
||||
|
||||
validate: function () {
|
||||
let me = this;
|
||||
let exist;
|
||||
|
||||
if (!this.validate_fy_dates()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Validate bank name
|
||||
if(me.values.bank_account) {
|
||||
frappe.call({
|
||||
async: false,
|
||||
method: "erpnext.accounts.doctype.account.chart_of_accounts.chart_of_accounts.validate_bank_account",
|
||||
args: {
|
||||
"coa": me.values.chart_of_accounts,
|
||||
"bank_account": me.values.bank_account
|
||||
},
|
||||
callback: function (r) {
|
||||
if(r.message){
|
||||
exist = r.message;
|
||||
me.get_field("bank_account").set_value("");
|
||||
let message = __('Account {0} already exists. Please enter a different name for your bank account.',
|
||||
[me.values.bank_account]
|
||||
);
|
||||
frappe.msgprint(message);
|
||||
}
|
||||
}
|
||||
});
|
||||
return !exist; // Return False if exist = true
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
|
@ -1218,37 +1218,43 @@
|
||||
{
|
||||
"tax_type": {
|
||||
"account_name": "Input Tax SGST",
|
||||
"tax_rate": 9.00
|
||||
"tax_rate": 9.00,
|
||||
"root_type": "Asset"
|
||||
}
|
||||
},
|
||||
{
|
||||
"tax_type": {
|
||||
"account_name": "Input Tax CGST",
|
||||
"tax_rate": 9.00
|
||||
"tax_rate": 9.00,
|
||||
"root_type": "Asset"
|
||||
}
|
||||
},
|
||||
{
|
||||
"tax_type": {
|
||||
"account_name": "Input Tax IGST",
|
||||
"tax_rate": 18.00
|
||||
"tax_rate": 18.00,
|
||||
"root_type": "Asset"
|
||||
}
|
||||
},
|
||||
{
|
||||
"tax_type": {
|
||||
"account_name": "Input Tax SGST RCM",
|
||||
"tax_rate": 9.00
|
||||
"tax_rate": 9.00,
|
||||
"root_type": "Asset"
|
||||
}
|
||||
},
|
||||
{
|
||||
"tax_type": {
|
||||
"account_name": "Input Tax CGST RCM",
|
||||
"tax_rate": 9.00
|
||||
"tax_rate": 9.00,
|
||||
"root_type": "Asset"
|
||||
}
|
||||
},
|
||||
{
|
||||
"tax_type": {
|
||||
"account_name": "Input Tax IGST RCM",
|
||||
"tax_rate": 18.00
|
||||
"tax_rate": 18.00,
|
||||
"root_type": "Asset"
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -1277,37 +1283,43 @@
|
||||
{
|
||||
"tax_type": {
|
||||
"account_name": "Input Tax SGST",
|
||||
"tax_rate": 2.5
|
||||
"tax_rate": 2.5,
|
||||
"root_type": "Asset"
|
||||
}
|
||||
},
|
||||
{
|
||||
"tax_type": {
|
||||
"account_name": "Input Tax CGST",
|
||||
"tax_rate": 2.5
|
||||
"tax_rate": 2.5,
|
||||
"root_type": "Asset"
|
||||
}
|
||||
},
|
||||
{
|
||||
"tax_type": {
|
||||
"account_name": "Input Tax IGST",
|
||||
"tax_rate": 5.0
|
||||
"tax_rate": 5.0,
|
||||
"root_type": "Asset"
|
||||
}
|
||||
},
|
||||
{
|
||||
"tax_type": {
|
||||
"account_name": "Input Tax SGST RCM",
|
||||
"tax_rate": 2.50
|
||||
"tax_rate": 2.50,
|
||||
"root_type": "Asset"
|
||||
}
|
||||
},
|
||||
{
|
||||
"tax_type": {
|
||||
"account_name": "Input Tax CGST RCM",
|
||||
"tax_rate": 2.50
|
||||
"tax_rate": 2.50,
|
||||
"root_type": "Asset"
|
||||
}
|
||||
},
|
||||
{
|
||||
"tax_type": {
|
||||
"account_name": "Input Tax IGST RCM",
|
||||
"tax_rate": 5.00
|
||||
"tax_rate": 5.00,
|
||||
"root_type": "Asset"
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -1336,37 +1348,43 @@
|
||||
{
|
||||
"tax_type": {
|
||||
"account_name": "Input Tax SGST",
|
||||
"tax_rate": 6.0
|
||||
"tax_rate": 6.0,
|
||||
"root_type": "Asset"
|
||||
}
|
||||
},
|
||||
{
|
||||
"tax_type": {
|
||||
"account_name": "Input Tax CGST",
|
||||
"tax_rate": 6.0
|
||||
"tax_rate": 6.0,
|
||||
"root_type": "Asset"
|
||||
}
|
||||
},
|
||||
{
|
||||
"tax_type": {
|
||||
"account_name": "Input Tax IGST",
|
||||
"tax_rate": 12.0
|
||||
"tax_rate": 12.0,
|
||||
"root_type": "Asset"
|
||||
}
|
||||
},
|
||||
{
|
||||
"tax_type": {
|
||||
"account_name": "Input Tax SGST RCM",
|
||||
"tax_rate": 6.00
|
||||
"tax_rate": 6.00,
|
||||
"root_type": "Asset"
|
||||
}
|
||||
},
|
||||
{
|
||||
"tax_type": {
|
||||
"account_name": "Input Tax CGST RCM",
|
||||
"tax_rate": 6.00
|
||||
"tax_rate": 6.00,
|
||||
"root_type": "Asset"
|
||||
}
|
||||
},
|
||||
{
|
||||
"tax_type": {
|
||||
"account_name": "Input Tax IGST RCM",
|
||||
"tax_rate": 12.00
|
||||
"tax_rate": 12.00,
|
||||
"root_type": "Asset"
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -1395,37 +1413,43 @@
|
||||
{
|
||||
"tax_type": {
|
||||
"account_name": "Input Tax SGST",
|
||||
"tax_rate": 14.0
|
||||
"tax_rate": 14.0,
|
||||
"root_type": "Asset"
|
||||
}
|
||||
},
|
||||
{
|
||||
"tax_type": {
|
||||
"account_name": "Input Tax CGST",
|
||||
"tax_rate": 14.0
|
||||
"tax_rate": 14.0,
|
||||
"root_type": "Asset"
|
||||
}
|
||||
},
|
||||
{
|
||||
"tax_type": {
|
||||
"account_name": "Input Tax IGST",
|
||||
"tax_rate": 28.0
|
||||
"tax_rate": 28.0,
|
||||
"root_type": "Asset"
|
||||
}
|
||||
},
|
||||
{
|
||||
"tax_type": {
|
||||
"account_name": "Input Tax SGST RCM",
|
||||
"tax_rate": 14.00
|
||||
"tax_rate": 14.00,
|
||||
"root_type": "Asset"
|
||||
}
|
||||
},
|
||||
{
|
||||
"tax_type": {
|
||||
"account_name": "Input Tax CGST RCM",
|
||||
"tax_rate": 14.00
|
||||
"tax_rate": 14.00,
|
||||
"root_type": "Asset"
|
||||
}
|
||||
},
|
||||
{
|
||||
"tax_type": {
|
||||
"account_name": "Input Tax IGST RCM",
|
||||
"tax_rate": 28.00
|
||||
"tax_rate": 28.00,
|
||||
"root_type": "Asset"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -202,16 +202,15 @@ def get_or_create_account(company_name, account):
|
||||
|
||||
existing_accounts = frappe.get_list('Account',
|
||||
filters={
|
||||
'account_name': account.get('account_name'),
|
||||
'account_number': account.get('account_number', ''),
|
||||
'company': company_name
|
||||
'company': company_name,
|
||||
'root_type': root_type
|
||||
},
|
||||
or_filters={
|
||||
'company': company_name,
|
||||
'root_type': root_type,
|
||||
'is_group': 0
|
||||
}
|
||||
)
|
||||
'account_name': account.get('account_name'),
|
||||
'account_number': account.get('account_number')
|
||||
})
|
||||
|
||||
print(company_name, account, existing_accounts)
|
||||
|
||||
if existing_accounts:
|
||||
return frappe.get_doc('Account', existing_accounts[0].name)
|
||||
|
Loading…
Reference in New Issue
Block a user