Employee advance (#11875)

* Employee Advances against Expense Claim

* added employee advance test cases and docs

* Default Employee Advance Account field in company

* Cleanup and fixes of employee advance
This commit is contained in:
Nabin Hait
2017-12-14 13:25:57 +05:30
committed by GitHub
parent 02b4b5f526
commit d0249b0880
28 changed files with 1445 additions and 94 deletions

View File

@@ -1,29 +0,0 @@
# Copyright (c) 2015, Web Notes Technologies Pvt. Ltd. and Contributors and contributors
# For license information, please see license.txt
import frappe, json
from frappe.utils import now, nowdate
from erpnext.hub_node.doctype.hub_settings.hub_settings import get_hub_settings
# API wrapper
@frappe.whitelist(allow_guest=True)
def call_method(access_token, method, message):
try:
args = json.loads(message)
if args:
return globals()[method](access_token, args)
else:
return globals()[method](access_token)
except:
print("Client Exception")
print(frappe.get_traceback())
def disable_and_suspend_hub_user(access_token):
hub_settings = get_hub_settings()
hub_settings.publish = 0
hub_settings.publish_pricing = 0
hub_settings.publish_availability = 0
hub_settings.suspended = 1
hub_settings.enabled = 0
hub_settings.save(ignore_permissions=True)